@fesmex/models 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/announcements/index.d.ts +2 -0
- package/dist/announcements/index.js +8 -0
- package/dist/announcements/models/Announcements.d.ts +17 -0
- package/dist/announcements/models/Announcements.js +45 -0
- package/dist/customers/index.d.ts +4 -0
- package/dist/customers/index.js +10 -0
- package/dist/customers/models/Customers.d.ts +22 -0
- package/dist/customers/models/Customers.js +38 -0
- package/dist/customers/models/FiscalProfileType.d.ts +15 -0
- package/dist/customers/models/FiscalProfileType.js +14 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +7 -0
- package/dist/inventory/index.d.ts +8 -0
- package/dist/inventory/index.js +22 -0
- package/dist/inventory/models/Article.d.ts +109 -0
- package/dist/inventory/models/Article.js +14 -0
- package/dist/inventory/models/ArticleClasses.d.ts +25 -0
- package/dist/inventory/models/ArticleClasses.js +8 -0
- package/dist/inventory/models/ArticleGroups.d.ts +25 -0
- package/dist/inventory/models/ArticleGroups.js +8 -0
- package/dist/inventory/models/ArticlePrices.d.ts +205 -0
- package/dist/inventory/models/ArticlePrices.js +14 -0
- package/dist/inventory/models/Currencies.d.ts +31 -0
- package/dist/inventory/models/Currencies.js +9 -0
- package/dist/inventory/models/InventoryStocks.d.ts +145 -0
- package/dist/inventory/models/InventoryStocks.js +12 -0
- package/dist/inventory/models/PriceLists.d.ts +37 -0
- package/dist/inventory/models/PriceLists.js +10 -0
- package/dist/inventory/models/Warehouses.d.ts +43 -0
- package/dist/inventory/models/Warehouses.js +11 -0
- package/dist/orders/index.d.ts +4 -0
- package/dist/orders/index.js +12 -0
- package/dist/orders/models/OrderStatusLogs.d.ts +13 -0
- package/dist/orders/models/OrderStatusLogs.js +29 -0
- package/dist/orders/models/Orders.d.ts +98 -0
- package/dist/orders/models/Orders.js +33 -0
- package/dist/quotes/index.d.ts +4 -0
- package/dist/quotes/index.js +14 -0
- package/dist/quotes/models/Quote.d.ts +208 -0
- package/dist/quotes/models/Quote.js +63 -0
- package/dist/quotes/models/QuoteArticle.d.ts +96 -0
- package/dist/quotes/models/QuoteArticle.js +19 -0
- package/dist/quotes/models/QuoteArticleExtra.d.ts +54 -0
- package/dist/quotes/models/QuoteArticleExtra.js +16 -0
- package/dist/quotes/models/QuoteContact.d.ts +49 -0
- package/dist/quotes/models/QuoteContact.js +12 -0
- package/dist/sap/index.d.ts +1 -0
- package/dist/sap/index.js +8 -0
- package/dist/sap/models/SyncLog.d.ts +43 -0
- package/dist/sap/models/SyncLog.js +70 -0
- package/dist/users/index.d.ts +1 -0
- package/dist/users/index.js +8 -0
- package/dist/users/models/Users.d.ts +36 -0
- package/dist/users/models/Users.js +56 -0
- package/package.json +6 -3
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Announcement = void 0;
|
|
7
|
+
var Announcements_1 = require("./models/Announcements");
|
|
8
|
+
Object.defineProperty(exports, "Announcement", { enumerable: true, get: function () { return __importDefault(Announcements_1).default; } });
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
import { UserRole } from "../../users/models/Users";
|
|
3
|
+
export interface AnnouncementType {
|
|
4
|
+
created_by: mongoose.Types.ObjectId;
|
|
5
|
+
updated_by?: mongoose.Types.ObjectId;
|
|
6
|
+
deleted_by?: mongoose.Types.ObjectId;
|
|
7
|
+
created_at: Date;
|
|
8
|
+
updated_at?: Date;
|
|
9
|
+
deleted_at?: Date;
|
|
10
|
+
title: string;
|
|
11
|
+
text: string;
|
|
12
|
+
roles: UserRole[];
|
|
13
|
+
}
|
|
14
|
+
declare const _default: mongoose.Model<AnnouncementType, {}, {}, {}, mongoose.Document<unknown, {}, AnnouncementType> & AnnouncementType & {
|
|
15
|
+
_id: mongoose.Types.ObjectId;
|
|
16
|
+
}, any>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const Users_1 = require("../../users/models/Users");
|
|
5
|
+
const announcementSchema = new mongoose_1.Schema({
|
|
6
|
+
created_by: {
|
|
7
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
8
|
+
ref: "User",
|
|
9
|
+
required: true,
|
|
10
|
+
},
|
|
11
|
+
updated_by: {
|
|
12
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
13
|
+
ref: "User",
|
|
14
|
+
},
|
|
15
|
+
deleted_by: {
|
|
16
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
17
|
+
ref: "User",
|
|
18
|
+
},
|
|
19
|
+
created_at: {
|
|
20
|
+
type: Date,
|
|
21
|
+
default: Date.now,
|
|
22
|
+
},
|
|
23
|
+
updated_at: Date,
|
|
24
|
+
deleted_at: Date,
|
|
25
|
+
title: {
|
|
26
|
+
type: String,
|
|
27
|
+
required: true,
|
|
28
|
+
trim: true,
|
|
29
|
+
},
|
|
30
|
+
text: {
|
|
31
|
+
type: String,
|
|
32
|
+
required: true,
|
|
33
|
+
trim: true,
|
|
34
|
+
},
|
|
35
|
+
roles: {
|
|
36
|
+
type: [String],
|
|
37
|
+
enum: Object.values(Users_1.UserRole),
|
|
38
|
+
required: true,
|
|
39
|
+
validate: {
|
|
40
|
+
validator: (roles) => roles.length > 0,
|
|
41
|
+
message: "At least one user role must be assigned.",
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
exports.default = (0, mongoose_1.model)("Announcement", announcementSchema, "announcements");
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default as Customer } from "./models/Customers";
|
|
2
|
+
export type { CustomerType, CustomerStatus } from "./models/Customers";
|
|
3
|
+
export { default as FiscalProfile } from "./models/FiscalProfileType";
|
|
4
|
+
export type { FiscalProfileType } from "./models/FiscalProfileType";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.FiscalProfile = exports.Customer = void 0;
|
|
7
|
+
var Customers_1 = require("./models/Customers");
|
|
8
|
+
Object.defineProperty(exports, "Customer", { enumerable: true, get: function () { return __importDefault(Customers_1).default; } });
|
|
9
|
+
var FiscalProfileType_1 = require("./models/FiscalProfileType");
|
|
10
|
+
Object.defineProperty(exports, "FiscalProfile", { enumerable: true, get: function () { return __importDefault(FiscalProfileType_1).default; } });
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
export declare enum CustomerStatus {
|
|
3
|
+
ACTIVE = "active",
|
|
4
|
+
INACTIVE = "inactive",
|
|
5
|
+
BANNED = "banned"
|
|
6
|
+
}
|
|
7
|
+
export interface CustomerType {
|
|
8
|
+
first_name: string;
|
|
9
|
+
last_name: string;
|
|
10
|
+
email: string;
|
|
11
|
+
mobile?: string;
|
|
12
|
+
password: string;
|
|
13
|
+
status: CustomerStatus;
|
|
14
|
+
fiscal_profile_id?: mongoose.Types.ObjectId;
|
|
15
|
+
created_at: Date;
|
|
16
|
+
updated_at?: Date;
|
|
17
|
+
deleted_at?: Date;
|
|
18
|
+
}
|
|
19
|
+
declare const _default: mongoose.Model<CustomerType, {}, {}, {}, mongoose.Document<unknown, {}, CustomerType> & CustomerType & {
|
|
20
|
+
_id: mongoose.Types.ObjectId;
|
|
21
|
+
}, any>;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CustomerStatus = void 0;
|
|
7
|
+
const mongoose_1 = require("mongoose");
|
|
8
|
+
const bcryptjs_1 = __importDefault(require("bcryptjs"));
|
|
9
|
+
var CustomerStatus;
|
|
10
|
+
(function (CustomerStatus) {
|
|
11
|
+
CustomerStatus["ACTIVE"] = "active";
|
|
12
|
+
CustomerStatus["INACTIVE"] = "inactive";
|
|
13
|
+
CustomerStatus["BANNED"] = "banned";
|
|
14
|
+
})(CustomerStatus || (exports.CustomerStatus = CustomerStatus = {}));
|
|
15
|
+
const customerSchema = new mongoose_1.Schema({
|
|
16
|
+
first_name: { type: String, required: true },
|
|
17
|
+
last_name: { type: String, required: true },
|
|
18
|
+
email: { type: String, required: true, unique: true },
|
|
19
|
+
mobile: { type: String },
|
|
20
|
+
password: { type: String, required: true, select: false },
|
|
21
|
+
status: {
|
|
22
|
+
type: String,
|
|
23
|
+
enum: Object.values(CustomerStatus),
|
|
24
|
+
default: CustomerStatus.ACTIVE,
|
|
25
|
+
},
|
|
26
|
+
fiscal_profile_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "FiscalProfile" },
|
|
27
|
+
created_at: { type: Date, default: Date.now },
|
|
28
|
+
updated_at: { type: Date },
|
|
29
|
+
deleted_at: { type: Date },
|
|
30
|
+
});
|
|
31
|
+
// Hash password
|
|
32
|
+
customerSchema.pre("save", async function (next) {
|
|
33
|
+
if (this.isModified("password")) {
|
|
34
|
+
this.password = await bcryptjs_1.default.hash(this.password, 12);
|
|
35
|
+
}
|
|
36
|
+
next();
|
|
37
|
+
});
|
|
38
|
+
exports.default = (0, mongoose_1.model)("Customer", customerSchema, "customers");
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
export interface FiscalProfileType {
|
|
3
|
+
customer_id: mongoose.Types.ObjectId;
|
|
4
|
+
rfc: string;
|
|
5
|
+
razon_social: string;
|
|
6
|
+
uso_cfdi: string;
|
|
7
|
+
regimen_fiscal: string;
|
|
8
|
+
cp: string;
|
|
9
|
+
created_at: Date;
|
|
10
|
+
updated_at?: Date;
|
|
11
|
+
}
|
|
12
|
+
declare const _default: mongoose.Model<FiscalProfileType, {}, {}, {}, mongoose.Document<unknown, {}, FiscalProfileType> & FiscalProfileType & {
|
|
13
|
+
_id: mongoose.Types.ObjectId;
|
|
14
|
+
}, any>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const fiscalProfileSchema = new mongoose_1.Schema({
|
|
5
|
+
customer_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "Customer", required: true },
|
|
6
|
+
rfc: { type: String, required: true },
|
|
7
|
+
razon_social: { type: String, required: true },
|
|
8
|
+
uso_cfdi: { type: String, required: true },
|
|
9
|
+
regimen_fiscal: { type: String, required: true },
|
|
10
|
+
cp: { type: String, required: true },
|
|
11
|
+
created_at: { type: Date, default: Date.now },
|
|
12
|
+
updated_at: { type: Date },
|
|
13
|
+
});
|
|
14
|
+
exports.default = (0, mongoose_1.model)("FiscalProfile", fiscalProfileSchema, "fiscal_profiles");
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -15,3 +15,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./clients"), exports);
|
|
18
|
+
__exportStar(require("./inventory"), exports);
|
|
19
|
+
__exportStar(require("./quotes"), exports);
|
|
20
|
+
__exportStar(require("./customers"), exports);
|
|
21
|
+
__exportStar(require("./orders"), exports);
|
|
22
|
+
__exportStar(require("./sap"), exports);
|
|
23
|
+
__exportStar(require("./announcements"), exports);
|
|
24
|
+
__exportStar(require("./users"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as Article } from "./models/Article";
|
|
2
|
+
export { default as ArticleGroup } from "./models/ArticleGroups";
|
|
3
|
+
export { default as ArticleClass } from "./models/ArticleClasses";
|
|
4
|
+
export { default as ArticlePrice } from "./models/ArticlePrices";
|
|
5
|
+
export { default as Currency } from "./models/Currencies";
|
|
6
|
+
export { default as Warehouse } from "./models/Warehouses";
|
|
7
|
+
export { default as InventoryStock } from "./models/InventoryStocks";
|
|
8
|
+
export { default as PriceList } from "./models/PriceLists";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PriceList = exports.InventoryStock = exports.Warehouse = exports.Currency = exports.ArticlePrice = exports.ArticleClass = exports.ArticleGroup = exports.Article = void 0;
|
|
7
|
+
var Article_1 = require("./models/Article");
|
|
8
|
+
Object.defineProperty(exports, "Article", { enumerable: true, get: function () { return __importDefault(Article_1).default; } });
|
|
9
|
+
var ArticleGroups_1 = require("./models/ArticleGroups");
|
|
10
|
+
Object.defineProperty(exports, "ArticleGroup", { enumerable: true, get: function () { return __importDefault(ArticleGroups_1).default; } });
|
|
11
|
+
var ArticleClasses_1 = require("./models/ArticleClasses");
|
|
12
|
+
Object.defineProperty(exports, "ArticleClass", { enumerable: true, get: function () { return __importDefault(ArticleClasses_1).default; } });
|
|
13
|
+
var ArticlePrices_1 = require("./models/ArticlePrices");
|
|
14
|
+
Object.defineProperty(exports, "ArticlePrice", { enumerable: true, get: function () { return __importDefault(ArticlePrices_1).default; } });
|
|
15
|
+
var Currencies_1 = require("./models/Currencies");
|
|
16
|
+
Object.defineProperty(exports, "Currency", { enumerable: true, get: function () { return __importDefault(Currencies_1).default; } });
|
|
17
|
+
var Warehouses_1 = require("./models/Warehouses");
|
|
18
|
+
Object.defineProperty(exports, "Warehouse", { enumerable: true, get: function () { return __importDefault(Warehouses_1).default; } });
|
|
19
|
+
var InventoryStocks_1 = require("./models/InventoryStocks");
|
|
20
|
+
Object.defineProperty(exports, "InventoryStock", { enumerable: true, get: function () { return __importDefault(InventoryStocks_1).default; } });
|
|
21
|
+
var PriceLists_1 = require("./models/PriceLists");
|
|
22
|
+
Object.defineProperty(exports, "PriceList", { enumerable: true, get: function () { return __importDefault(PriceLists_1).default; } });
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { Schema, Types } from "mongoose";
|
|
2
|
+
declare const _default: import("mongoose").Model<{
|
|
3
|
+
created_at: Date;
|
|
4
|
+
description: string;
|
|
5
|
+
article_number: string;
|
|
6
|
+
unit: string;
|
|
7
|
+
group_id: {
|
|
8
|
+
prototype?: Types.ObjectId;
|
|
9
|
+
cacheHexString?: unknown;
|
|
10
|
+
generate?: {};
|
|
11
|
+
createFromTime?: {};
|
|
12
|
+
createFromHexString?: {};
|
|
13
|
+
createFromBase64?: {};
|
|
14
|
+
isValid?: {};
|
|
15
|
+
};
|
|
16
|
+
updated_at?: Date;
|
|
17
|
+
model?: string;
|
|
18
|
+
brand?: string;
|
|
19
|
+
}, {}, {}, {}, import("mongoose").Document<unknown, {}, {
|
|
20
|
+
created_at: Date;
|
|
21
|
+
description: string;
|
|
22
|
+
article_number: string;
|
|
23
|
+
unit: string;
|
|
24
|
+
group_id: {
|
|
25
|
+
prototype?: Types.ObjectId;
|
|
26
|
+
cacheHexString?: unknown;
|
|
27
|
+
generate?: {};
|
|
28
|
+
createFromTime?: {};
|
|
29
|
+
createFromHexString?: {};
|
|
30
|
+
createFromBase64?: {};
|
|
31
|
+
isValid?: {};
|
|
32
|
+
};
|
|
33
|
+
updated_at?: Date;
|
|
34
|
+
model?: string;
|
|
35
|
+
brand?: string;
|
|
36
|
+
}> & {
|
|
37
|
+
created_at: Date;
|
|
38
|
+
description: string;
|
|
39
|
+
article_number: string;
|
|
40
|
+
unit: string;
|
|
41
|
+
group_id: {
|
|
42
|
+
prototype?: Types.ObjectId;
|
|
43
|
+
cacheHexString?: unknown;
|
|
44
|
+
generate?: {};
|
|
45
|
+
createFromTime?: {};
|
|
46
|
+
createFromHexString?: {};
|
|
47
|
+
createFromBase64?: {};
|
|
48
|
+
isValid?: {};
|
|
49
|
+
};
|
|
50
|
+
updated_at?: Date;
|
|
51
|
+
model?: string;
|
|
52
|
+
brand?: string;
|
|
53
|
+
} & {
|
|
54
|
+
_id: Types.ObjectId;
|
|
55
|
+
}, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
|
|
56
|
+
created_at: Date;
|
|
57
|
+
description: string;
|
|
58
|
+
article_number: string;
|
|
59
|
+
unit: string;
|
|
60
|
+
group_id: {
|
|
61
|
+
prototype?: Types.ObjectId;
|
|
62
|
+
cacheHexString?: unknown;
|
|
63
|
+
generate?: {};
|
|
64
|
+
createFromTime?: {};
|
|
65
|
+
createFromHexString?: {};
|
|
66
|
+
createFromBase64?: {};
|
|
67
|
+
isValid?: {};
|
|
68
|
+
};
|
|
69
|
+
updated_at?: Date;
|
|
70
|
+
model?: string;
|
|
71
|
+
brand?: string;
|
|
72
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
73
|
+
created_at: Date;
|
|
74
|
+
description: string;
|
|
75
|
+
article_number: string;
|
|
76
|
+
unit: string;
|
|
77
|
+
group_id: {
|
|
78
|
+
prototype?: Types.ObjectId;
|
|
79
|
+
cacheHexString?: unknown;
|
|
80
|
+
generate?: {};
|
|
81
|
+
createFromTime?: {};
|
|
82
|
+
createFromHexString?: {};
|
|
83
|
+
createFromBase64?: {};
|
|
84
|
+
isValid?: {};
|
|
85
|
+
};
|
|
86
|
+
updated_at?: Date;
|
|
87
|
+
model?: string;
|
|
88
|
+
brand?: string;
|
|
89
|
+
}>> & import("mongoose").FlatRecord<{
|
|
90
|
+
created_at: Date;
|
|
91
|
+
description: string;
|
|
92
|
+
article_number: string;
|
|
93
|
+
unit: string;
|
|
94
|
+
group_id: {
|
|
95
|
+
prototype?: Types.ObjectId;
|
|
96
|
+
cacheHexString?: unknown;
|
|
97
|
+
generate?: {};
|
|
98
|
+
createFromTime?: {};
|
|
99
|
+
createFromHexString?: {};
|
|
100
|
+
createFromBase64?: {};
|
|
101
|
+
isValid?: {};
|
|
102
|
+
};
|
|
103
|
+
updated_at?: Date;
|
|
104
|
+
model?: string;
|
|
105
|
+
brand?: string;
|
|
106
|
+
}> & {
|
|
107
|
+
_id: Types.ObjectId;
|
|
108
|
+
}>>;
|
|
109
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const articleSchema = new mongoose_1.Schema({
|
|
5
|
+
article_number: { type: String, required: true, unique: true }, // SAP ItemCode
|
|
6
|
+
description: { type: String, required: true },
|
|
7
|
+
unit: { type: String, required: true },
|
|
8
|
+
brand: { type: String },
|
|
9
|
+
model: { type: String },
|
|
10
|
+
group_id: { type: mongoose_1.Types.ObjectId, ref: "ArticleGroup", required: true },
|
|
11
|
+
created_at: { type: Date, default: Date.now },
|
|
12
|
+
updated_at: { type: Date },
|
|
13
|
+
});
|
|
14
|
+
exports.default = (0, mongoose_1.model)("Article", articleSchema, "articles");
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Schema } from "mongoose";
|
|
2
|
+
declare const _default: import("mongoose").Model<{
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
}, {}, {}, {}, import("mongoose").Document<unknown, {}, {
|
|
6
|
+
name: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
}> & {
|
|
9
|
+
name: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
} & {
|
|
12
|
+
_id: import("mongoose").Types.ObjectId;
|
|
13
|
+
}, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
|
|
14
|
+
name: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
17
|
+
name: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
}>> & import("mongoose").FlatRecord<{
|
|
20
|
+
name: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
}> & {
|
|
23
|
+
_id: import("mongoose").Types.ObjectId;
|
|
24
|
+
}>>;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const articleClassSchema = new mongoose_1.Schema({
|
|
5
|
+
name: { type: String, required: true },
|
|
6
|
+
description: { type: String },
|
|
7
|
+
});
|
|
8
|
+
exports.default = (0, mongoose_1.model)("ArticleClass", articleClassSchema, "article_classes");
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Schema } from "mongoose";
|
|
2
|
+
declare const _default: import("mongoose").Model<{
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
}, {}, {}, {}, import("mongoose").Document<unknown, {}, {
|
|
6
|
+
name: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
}> & {
|
|
9
|
+
name: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
} & {
|
|
12
|
+
_id: import("mongoose").Types.ObjectId;
|
|
13
|
+
}, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
|
|
14
|
+
name: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
17
|
+
name: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
}>> & import("mongoose").FlatRecord<{
|
|
20
|
+
name: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
}> & {
|
|
23
|
+
_id: import("mongoose").Types.ObjectId;
|
|
24
|
+
}>>;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const articleGroupSchema = new mongoose_1.Schema({
|
|
5
|
+
name: { type: String, required: true },
|
|
6
|
+
description: { type: String },
|
|
7
|
+
});
|
|
8
|
+
exports.default = (0, mongoose_1.model)("ArticleGroup", articleGroupSchema, "article_groups");
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { Schema, Types } from "mongoose";
|
|
2
|
+
declare const _default: import("mongoose").Model<{
|
|
3
|
+
created_at: Date;
|
|
4
|
+
article_id: {
|
|
5
|
+
prototype?: Types.ObjectId;
|
|
6
|
+
cacheHexString?: unknown;
|
|
7
|
+
generate?: {};
|
|
8
|
+
createFromTime?: {};
|
|
9
|
+
createFromHexString?: {};
|
|
10
|
+
createFromBase64?: {};
|
|
11
|
+
isValid?: {};
|
|
12
|
+
};
|
|
13
|
+
price_list_id: {
|
|
14
|
+
prototype?: Types.ObjectId;
|
|
15
|
+
cacheHexString?: unknown;
|
|
16
|
+
generate?: {};
|
|
17
|
+
createFromTime?: {};
|
|
18
|
+
createFromHexString?: {};
|
|
19
|
+
createFromBase64?: {};
|
|
20
|
+
isValid?: {};
|
|
21
|
+
};
|
|
22
|
+
currency_id: {
|
|
23
|
+
prototype?: Types.ObjectId;
|
|
24
|
+
cacheHexString?: unknown;
|
|
25
|
+
generate?: {};
|
|
26
|
+
createFromTime?: {};
|
|
27
|
+
createFromHexString?: {};
|
|
28
|
+
createFromBase64?: {};
|
|
29
|
+
isValid?: {};
|
|
30
|
+
};
|
|
31
|
+
price: number;
|
|
32
|
+
updated_at?: Date;
|
|
33
|
+
valid_from?: Date;
|
|
34
|
+
valid_to?: Date;
|
|
35
|
+
}, {}, {}, {}, import("mongoose").Document<unknown, {}, {
|
|
36
|
+
created_at: Date;
|
|
37
|
+
article_id: {
|
|
38
|
+
prototype?: Types.ObjectId;
|
|
39
|
+
cacheHexString?: unknown;
|
|
40
|
+
generate?: {};
|
|
41
|
+
createFromTime?: {};
|
|
42
|
+
createFromHexString?: {};
|
|
43
|
+
createFromBase64?: {};
|
|
44
|
+
isValid?: {};
|
|
45
|
+
};
|
|
46
|
+
price_list_id: {
|
|
47
|
+
prototype?: Types.ObjectId;
|
|
48
|
+
cacheHexString?: unknown;
|
|
49
|
+
generate?: {};
|
|
50
|
+
createFromTime?: {};
|
|
51
|
+
createFromHexString?: {};
|
|
52
|
+
createFromBase64?: {};
|
|
53
|
+
isValid?: {};
|
|
54
|
+
};
|
|
55
|
+
currency_id: {
|
|
56
|
+
prototype?: Types.ObjectId;
|
|
57
|
+
cacheHexString?: unknown;
|
|
58
|
+
generate?: {};
|
|
59
|
+
createFromTime?: {};
|
|
60
|
+
createFromHexString?: {};
|
|
61
|
+
createFromBase64?: {};
|
|
62
|
+
isValid?: {};
|
|
63
|
+
};
|
|
64
|
+
price: number;
|
|
65
|
+
updated_at?: Date;
|
|
66
|
+
valid_from?: Date;
|
|
67
|
+
valid_to?: Date;
|
|
68
|
+
}> & {
|
|
69
|
+
created_at: Date;
|
|
70
|
+
article_id: {
|
|
71
|
+
prototype?: Types.ObjectId;
|
|
72
|
+
cacheHexString?: unknown;
|
|
73
|
+
generate?: {};
|
|
74
|
+
createFromTime?: {};
|
|
75
|
+
createFromHexString?: {};
|
|
76
|
+
createFromBase64?: {};
|
|
77
|
+
isValid?: {};
|
|
78
|
+
};
|
|
79
|
+
price_list_id: {
|
|
80
|
+
prototype?: Types.ObjectId;
|
|
81
|
+
cacheHexString?: unknown;
|
|
82
|
+
generate?: {};
|
|
83
|
+
createFromTime?: {};
|
|
84
|
+
createFromHexString?: {};
|
|
85
|
+
createFromBase64?: {};
|
|
86
|
+
isValid?: {};
|
|
87
|
+
};
|
|
88
|
+
currency_id: {
|
|
89
|
+
prototype?: Types.ObjectId;
|
|
90
|
+
cacheHexString?: unknown;
|
|
91
|
+
generate?: {};
|
|
92
|
+
createFromTime?: {};
|
|
93
|
+
createFromHexString?: {};
|
|
94
|
+
createFromBase64?: {};
|
|
95
|
+
isValid?: {};
|
|
96
|
+
};
|
|
97
|
+
price: number;
|
|
98
|
+
updated_at?: Date;
|
|
99
|
+
valid_from?: Date;
|
|
100
|
+
valid_to?: Date;
|
|
101
|
+
} & {
|
|
102
|
+
_id: Types.ObjectId;
|
|
103
|
+
}, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
|
|
104
|
+
created_at: Date;
|
|
105
|
+
article_id: {
|
|
106
|
+
prototype?: Types.ObjectId;
|
|
107
|
+
cacheHexString?: unknown;
|
|
108
|
+
generate?: {};
|
|
109
|
+
createFromTime?: {};
|
|
110
|
+
createFromHexString?: {};
|
|
111
|
+
createFromBase64?: {};
|
|
112
|
+
isValid?: {};
|
|
113
|
+
};
|
|
114
|
+
price_list_id: {
|
|
115
|
+
prototype?: Types.ObjectId;
|
|
116
|
+
cacheHexString?: unknown;
|
|
117
|
+
generate?: {};
|
|
118
|
+
createFromTime?: {};
|
|
119
|
+
createFromHexString?: {};
|
|
120
|
+
createFromBase64?: {};
|
|
121
|
+
isValid?: {};
|
|
122
|
+
};
|
|
123
|
+
currency_id: {
|
|
124
|
+
prototype?: Types.ObjectId;
|
|
125
|
+
cacheHexString?: unknown;
|
|
126
|
+
generate?: {};
|
|
127
|
+
createFromTime?: {};
|
|
128
|
+
createFromHexString?: {};
|
|
129
|
+
createFromBase64?: {};
|
|
130
|
+
isValid?: {};
|
|
131
|
+
};
|
|
132
|
+
price: number;
|
|
133
|
+
updated_at?: Date;
|
|
134
|
+
valid_from?: Date;
|
|
135
|
+
valid_to?: Date;
|
|
136
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
137
|
+
created_at: Date;
|
|
138
|
+
article_id: {
|
|
139
|
+
prototype?: Types.ObjectId;
|
|
140
|
+
cacheHexString?: unknown;
|
|
141
|
+
generate?: {};
|
|
142
|
+
createFromTime?: {};
|
|
143
|
+
createFromHexString?: {};
|
|
144
|
+
createFromBase64?: {};
|
|
145
|
+
isValid?: {};
|
|
146
|
+
};
|
|
147
|
+
price_list_id: {
|
|
148
|
+
prototype?: Types.ObjectId;
|
|
149
|
+
cacheHexString?: unknown;
|
|
150
|
+
generate?: {};
|
|
151
|
+
createFromTime?: {};
|
|
152
|
+
createFromHexString?: {};
|
|
153
|
+
createFromBase64?: {};
|
|
154
|
+
isValid?: {};
|
|
155
|
+
};
|
|
156
|
+
currency_id: {
|
|
157
|
+
prototype?: Types.ObjectId;
|
|
158
|
+
cacheHexString?: unknown;
|
|
159
|
+
generate?: {};
|
|
160
|
+
createFromTime?: {};
|
|
161
|
+
createFromHexString?: {};
|
|
162
|
+
createFromBase64?: {};
|
|
163
|
+
isValid?: {};
|
|
164
|
+
};
|
|
165
|
+
price: number;
|
|
166
|
+
updated_at?: Date;
|
|
167
|
+
valid_from?: Date;
|
|
168
|
+
valid_to?: Date;
|
|
169
|
+
}>> & import("mongoose").FlatRecord<{
|
|
170
|
+
created_at: Date;
|
|
171
|
+
article_id: {
|
|
172
|
+
prototype?: Types.ObjectId;
|
|
173
|
+
cacheHexString?: unknown;
|
|
174
|
+
generate?: {};
|
|
175
|
+
createFromTime?: {};
|
|
176
|
+
createFromHexString?: {};
|
|
177
|
+
createFromBase64?: {};
|
|
178
|
+
isValid?: {};
|
|
179
|
+
};
|
|
180
|
+
price_list_id: {
|
|
181
|
+
prototype?: Types.ObjectId;
|
|
182
|
+
cacheHexString?: unknown;
|
|
183
|
+
generate?: {};
|
|
184
|
+
createFromTime?: {};
|
|
185
|
+
createFromHexString?: {};
|
|
186
|
+
createFromBase64?: {};
|
|
187
|
+
isValid?: {};
|
|
188
|
+
};
|
|
189
|
+
currency_id: {
|
|
190
|
+
prototype?: Types.ObjectId;
|
|
191
|
+
cacheHexString?: unknown;
|
|
192
|
+
generate?: {};
|
|
193
|
+
createFromTime?: {};
|
|
194
|
+
createFromHexString?: {};
|
|
195
|
+
createFromBase64?: {};
|
|
196
|
+
isValid?: {};
|
|
197
|
+
};
|
|
198
|
+
price: number;
|
|
199
|
+
updated_at?: Date;
|
|
200
|
+
valid_from?: Date;
|
|
201
|
+
valid_to?: Date;
|
|
202
|
+
}> & {
|
|
203
|
+
_id: Types.ObjectId;
|
|
204
|
+
}>>;
|
|
205
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const articlePriceSchema = new mongoose_1.Schema({
|
|
5
|
+
article_id: { type: mongoose_1.Types.ObjectId, ref: "Article", required: true },
|
|
6
|
+
price_list_id: { type: mongoose_1.Types.ObjectId, ref: "PriceList", required: true },
|
|
7
|
+
currency_id: { type: mongoose_1.Types.ObjectId, ref: "Currency", required: true },
|
|
8
|
+
price: { type: Number, required: true },
|
|
9
|
+
valid_from: { type: Date },
|
|
10
|
+
valid_to: { type: Date },
|
|
11
|
+
created_at: { type: Date, default: Date.now },
|
|
12
|
+
updated_at: { type: Date },
|
|
13
|
+
});
|
|
14
|
+
exports.default = (0, mongoose_1.model)("ArticlePrice", articlePriceSchema, "article_prices");
|