@fesmex/models 0.1.3 → 0.1.4

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.
Files changed (31) hide show
  1. package/dist/index.d.ts +2 -0
  2. package/dist/index.js +2 -0
  3. package/dist/inventory/index.d.ts +8 -0
  4. package/dist/inventory/index.js +22 -0
  5. package/dist/inventory/models/Article.d.ts +109 -0
  6. package/dist/inventory/models/Article.js +14 -0
  7. package/dist/inventory/models/ArticleClasses.d.ts +25 -0
  8. package/dist/inventory/models/ArticleClasses.js +8 -0
  9. package/dist/inventory/models/ArticleGroups.d.ts +25 -0
  10. package/dist/inventory/models/ArticleGroups.js +8 -0
  11. package/dist/inventory/models/ArticlePrices.d.ts +205 -0
  12. package/dist/inventory/models/ArticlePrices.js +14 -0
  13. package/dist/inventory/models/Currencies.d.ts +31 -0
  14. package/dist/inventory/models/Currencies.js +9 -0
  15. package/dist/inventory/models/InventoryStocks.d.ts +145 -0
  16. package/dist/inventory/models/InventoryStocks.js +12 -0
  17. package/dist/inventory/models/PriceLists.d.ts +37 -0
  18. package/dist/inventory/models/PriceLists.js +10 -0
  19. package/dist/inventory/models/Warehouses.d.ts +43 -0
  20. package/dist/inventory/models/Warehouses.js +11 -0
  21. package/dist/quotes/index.d.ts +4 -0
  22. package/dist/quotes/index.js +14 -0
  23. package/dist/quotes/models/Quote.d.ts +208 -0
  24. package/dist/quotes/models/Quote.js +63 -0
  25. package/dist/quotes/models/QuoteArticle.d.ts +96 -0
  26. package/dist/quotes/models/QuoteArticle.js +19 -0
  27. package/dist/quotes/models/QuoteArticleExtra.d.ts +54 -0
  28. package/dist/quotes/models/QuoteArticleExtra.js +16 -0
  29. package/dist/quotes/models/QuoteContact.d.ts +49 -0
  30. package/dist/quotes/models/QuoteContact.js +12 -0
  31. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1 +1,3 @@
1
1
  export * from "./clients";
2
+ export * from "./inventory";
3
+ export * from "./quotes";
package/dist/index.js CHANGED
@@ -15,3 +15,5 @@ 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);
@@ -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");
@@ -0,0 +1,31 @@
1
+ import { Schema } from "mongoose";
2
+ declare const _default: import("mongoose").Model<{
3
+ symbol: string;
4
+ name: string;
5
+ code: string;
6
+ }, {}, {}, {}, import("mongoose").Document<unknown, {}, {
7
+ symbol: string;
8
+ name: string;
9
+ code: string;
10
+ }> & {
11
+ symbol: string;
12
+ name: string;
13
+ code: string;
14
+ } & {
15
+ _id: import("mongoose").Types.ObjectId;
16
+ }, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
17
+ symbol: string;
18
+ name: string;
19
+ code: string;
20
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
21
+ symbol: string;
22
+ name: string;
23
+ code: string;
24
+ }>> & import("mongoose").FlatRecord<{
25
+ symbol: string;
26
+ name: string;
27
+ code: string;
28
+ }> & {
29
+ _id: import("mongoose").Types.ObjectId;
30
+ }>>;
31
+ export default _default;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const mongoose_1 = require("mongoose");
4
+ const currencySchema = new mongoose_1.Schema({
5
+ code: { type: String, required: true, unique: true },
6
+ symbol: { type: String, required: true },
7
+ name: { type: String, required: true },
8
+ });
9
+ exports.default = (0, mongoose_1.model)("Currency", currencySchema, "currencies");
@@ -0,0 +1,145 @@
1
+ import { Schema, Types } from "mongoose";
2
+ declare const _default: import("mongoose").Model<{
3
+ updated_at: Date;
4
+ count: number;
5
+ article_id: {
6
+ prototype?: Types.ObjectId;
7
+ cacheHexString?: unknown;
8
+ generate?: {};
9
+ createFromTime?: {};
10
+ createFromHexString?: {};
11
+ createFromBase64?: {};
12
+ isValid?: {};
13
+ };
14
+ warehouse_id: {
15
+ prototype?: Types.ObjectId;
16
+ cacheHexString?: unknown;
17
+ generate?: {};
18
+ createFromTime?: {};
19
+ createFromHexString?: {};
20
+ createFromBase64?: {};
21
+ isValid?: {};
22
+ };
23
+ min_stock?: number;
24
+ max_stock?: number;
25
+ }, {}, {}, {}, import("mongoose").Document<unknown, {}, {
26
+ updated_at: Date;
27
+ count: number;
28
+ article_id: {
29
+ prototype?: Types.ObjectId;
30
+ cacheHexString?: unknown;
31
+ generate?: {};
32
+ createFromTime?: {};
33
+ createFromHexString?: {};
34
+ createFromBase64?: {};
35
+ isValid?: {};
36
+ };
37
+ warehouse_id: {
38
+ prototype?: Types.ObjectId;
39
+ cacheHexString?: unknown;
40
+ generate?: {};
41
+ createFromTime?: {};
42
+ createFromHexString?: {};
43
+ createFromBase64?: {};
44
+ isValid?: {};
45
+ };
46
+ min_stock?: number;
47
+ max_stock?: number;
48
+ }> & {
49
+ updated_at: Date;
50
+ count: number;
51
+ article_id: {
52
+ prototype?: Types.ObjectId;
53
+ cacheHexString?: unknown;
54
+ generate?: {};
55
+ createFromTime?: {};
56
+ createFromHexString?: {};
57
+ createFromBase64?: {};
58
+ isValid?: {};
59
+ };
60
+ warehouse_id: {
61
+ prototype?: Types.ObjectId;
62
+ cacheHexString?: unknown;
63
+ generate?: {};
64
+ createFromTime?: {};
65
+ createFromHexString?: {};
66
+ createFromBase64?: {};
67
+ isValid?: {};
68
+ };
69
+ min_stock?: number;
70
+ max_stock?: number;
71
+ } & {
72
+ _id: Types.ObjectId;
73
+ }, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
74
+ updated_at: Date;
75
+ count: number;
76
+ article_id: {
77
+ prototype?: Types.ObjectId;
78
+ cacheHexString?: unknown;
79
+ generate?: {};
80
+ createFromTime?: {};
81
+ createFromHexString?: {};
82
+ createFromBase64?: {};
83
+ isValid?: {};
84
+ };
85
+ warehouse_id: {
86
+ prototype?: Types.ObjectId;
87
+ cacheHexString?: unknown;
88
+ generate?: {};
89
+ createFromTime?: {};
90
+ createFromHexString?: {};
91
+ createFromBase64?: {};
92
+ isValid?: {};
93
+ };
94
+ min_stock?: number;
95
+ max_stock?: number;
96
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
97
+ updated_at: Date;
98
+ count: number;
99
+ article_id: {
100
+ prototype?: Types.ObjectId;
101
+ cacheHexString?: unknown;
102
+ generate?: {};
103
+ createFromTime?: {};
104
+ createFromHexString?: {};
105
+ createFromBase64?: {};
106
+ isValid?: {};
107
+ };
108
+ warehouse_id: {
109
+ prototype?: Types.ObjectId;
110
+ cacheHexString?: unknown;
111
+ generate?: {};
112
+ createFromTime?: {};
113
+ createFromHexString?: {};
114
+ createFromBase64?: {};
115
+ isValid?: {};
116
+ };
117
+ min_stock?: number;
118
+ max_stock?: number;
119
+ }>> & import("mongoose").FlatRecord<{
120
+ updated_at: Date;
121
+ count: number;
122
+ article_id: {
123
+ prototype?: Types.ObjectId;
124
+ cacheHexString?: unknown;
125
+ generate?: {};
126
+ createFromTime?: {};
127
+ createFromHexString?: {};
128
+ createFromBase64?: {};
129
+ isValid?: {};
130
+ };
131
+ warehouse_id: {
132
+ prototype?: Types.ObjectId;
133
+ cacheHexString?: unknown;
134
+ generate?: {};
135
+ createFromTime?: {};
136
+ createFromHexString?: {};
137
+ createFromBase64?: {};
138
+ isValid?: {};
139
+ };
140
+ min_stock?: number;
141
+ max_stock?: number;
142
+ }> & {
143
+ _id: Types.ObjectId;
144
+ }>>;
145
+ export default _default;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const mongoose_1 = require("mongoose");
4
+ const inventoryStockSchema = new mongoose_1.Schema({
5
+ article_id: { type: mongoose_1.Types.ObjectId, ref: "Article", required: true },
6
+ warehouse_id: { type: mongoose_1.Types.ObjectId, ref: "Warehouse", required: true },
7
+ count: { type: Number, required: true },
8
+ min_stock: { type: Number },
9
+ max_stock: { type: Number },
10
+ updated_at: { type: Date, default: Date.now },
11
+ });
12
+ exports.default = (0, mongoose_1.model)("InventoryStock", inventoryStockSchema, "inventory_stocks");
@@ -0,0 +1,37 @@
1
+ import { Schema } from "mongoose";
2
+ declare const _default: import("mongoose").Model<{
3
+ number: string;
4
+ created_at: Date;
5
+ name: string;
6
+ updated_at?: Date;
7
+ }, {}, {}, {}, import("mongoose").Document<unknown, {}, {
8
+ number: string;
9
+ created_at: Date;
10
+ name: string;
11
+ updated_at?: Date;
12
+ }> & {
13
+ number: string;
14
+ created_at: Date;
15
+ name: string;
16
+ updated_at?: Date;
17
+ } & {
18
+ _id: import("mongoose").Types.ObjectId;
19
+ }, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
20
+ number: string;
21
+ created_at: Date;
22
+ name: string;
23
+ updated_at?: Date;
24
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
25
+ number: string;
26
+ created_at: Date;
27
+ name: string;
28
+ updated_at?: Date;
29
+ }>> & import("mongoose").FlatRecord<{
30
+ number: string;
31
+ created_at: Date;
32
+ name: string;
33
+ updated_at?: Date;
34
+ }> & {
35
+ _id: import("mongoose").Types.ObjectId;
36
+ }>>;
37
+ export default _default;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const mongoose_1 = require("mongoose");
4
+ const priceListSchema = new mongoose_1.Schema({
5
+ number: { type: String, required: true, unique: true },
6
+ name: { type: String, required: true },
7
+ created_at: { type: Date, default: Date.now },
8
+ updated_at: { type: Date },
9
+ });
10
+ exports.default = (0, mongoose_1.model)("PriceList", priceListSchema, "price_lists");
@@ -0,0 +1,43 @@
1
+ import { Schema } from "mongoose";
2
+ declare const _default: import("mongoose").Model<{
3
+ created_at: Date;
4
+ name: string;
5
+ code: string;
6
+ updated_at?: Date;
7
+ location?: string;
8
+ }, {}, {}, {}, import("mongoose").Document<unknown, {}, {
9
+ created_at: Date;
10
+ name: string;
11
+ code: string;
12
+ updated_at?: Date;
13
+ location?: string;
14
+ }> & {
15
+ created_at: Date;
16
+ name: string;
17
+ code: string;
18
+ updated_at?: Date;
19
+ location?: string;
20
+ } & {
21
+ _id: import("mongoose").Types.ObjectId;
22
+ }, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
23
+ created_at: Date;
24
+ name: string;
25
+ code: string;
26
+ updated_at?: Date;
27
+ location?: string;
28
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
29
+ created_at: Date;
30
+ name: string;
31
+ code: string;
32
+ updated_at?: Date;
33
+ location?: string;
34
+ }>> & import("mongoose").FlatRecord<{
35
+ created_at: Date;
36
+ name: string;
37
+ code: string;
38
+ updated_at?: Date;
39
+ location?: string;
40
+ }> & {
41
+ _id: import("mongoose").Types.ObjectId;
42
+ }>>;
43
+ export default _default;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const mongoose_1 = require("mongoose");
4
+ const warehouseSchema = new mongoose_1.Schema({
5
+ code: { type: String, required: true, unique: true },
6
+ name: { type: String, required: true },
7
+ location: { type: String },
8
+ created_at: { type: Date, default: Date.now },
9
+ updated_at: { type: Date },
10
+ });
11
+ exports.default = (0, mongoose_1.model)("Warehouse", warehouseSchema, "warehouses");
@@ -0,0 +1,4 @@
1
+ export { default as Quote } from "./models/Quote";
2
+ export { default as QuoteArticle } from "./models/QuoteArticle";
3
+ export { default as QuoteArticleExtra } from "./models/QuoteArticleExtra";
4
+ export { default as QuoteContact } from "./models/QuoteContact";
@@ -0,0 +1,14 @@
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.QuoteContact = exports.QuoteArticleExtra = exports.QuoteArticle = exports.Quote = void 0;
7
+ var Quote_1 = require("./models/Quote");
8
+ Object.defineProperty(exports, "Quote", { enumerable: true, get: function () { return __importDefault(Quote_1).default; } });
9
+ var QuoteArticle_1 = require("./models/QuoteArticle");
10
+ Object.defineProperty(exports, "QuoteArticle", { enumerable: true, get: function () { return __importDefault(QuoteArticle_1).default; } });
11
+ var QuoteArticleExtra_1 = require("./models/QuoteArticleExtra");
12
+ Object.defineProperty(exports, "QuoteArticleExtra", { enumerable: true, get: function () { return __importDefault(QuoteArticleExtra_1).default; } });
13
+ var QuoteContact_1 = require("./models/QuoteContact");
14
+ Object.defineProperty(exports, "QuoteContact", { enumerable: true, get: function () { return __importDefault(QuoteContact_1).default; } });
@@ -0,0 +1,208 @@
1
+ import { Schema } from "mongoose";
2
+ export declare enum QuoteStatus {
3
+ OPPORTUNITY = "OPPORTUNITY",
4
+ QUOTE = "QUOTE",
5
+ FOLLOWING = "FOLLOWING",
6
+ NEGOTIATION = "NEGOTIATION"
7
+ }
8
+ export declare enum Status {
9
+ OPEN = "OPEN",
10
+ WIN = "WIN",
11
+ LOST = "LOST",
12
+ DELETE = "DELETE"
13
+ }
14
+ export declare enum CreatedMethod {
15
+ MANUAL = "MANUAL",
16
+ CSV = "CSV"
17
+ }
18
+ declare const _default: import("mongoose").Model<{
19
+ quote_number: number;
20
+ quote_revision: number;
21
+ company_id: import("mongoose").Types.ObjectId;
22
+ terms_ids: import("mongoose").Types.ObjectId[];
23
+ status: Status;
24
+ quote_status: QuoteStatus;
25
+ should_sync: boolean;
26
+ created_method: CreatedMethod;
27
+ pipedrive_id?: string;
28
+ sap_id?: string;
29
+ deleted_at?: Date;
30
+ deleted_by?: import("mongoose").Types.ObjectId;
31
+ date?: Date;
32
+ currency_id?: import("mongoose").Types.ObjectId;
33
+ quote_ref?: string;
34
+ company?: string;
35
+ company_pipedrive_id?: string;
36
+ contact_id?: import("mongoose").Types.ObjectId;
37
+ project_name?: string;
38
+ project_lab?: string;
39
+ payment_condition?: string;
40
+ payment_exp?: string;
41
+ iva?: string;
42
+ sap_quotation_entry?: number;
43
+ sap_order_entry?: number;
44
+ pdf_download_link?: string;
45
+ notes?: string;
46
+ created_by?: import("mongoose").Types.ObjectId;
47
+ updated_by?: import("mongoose").Types.ObjectId;
48
+ }, {}, {}, {}, import("mongoose").Document<unknown, {}, {
49
+ quote_number: number;
50
+ quote_revision: number;
51
+ company_id: import("mongoose").Types.ObjectId;
52
+ terms_ids: import("mongoose").Types.ObjectId[];
53
+ status: Status;
54
+ quote_status: QuoteStatus;
55
+ should_sync: boolean;
56
+ created_method: CreatedMethod;
57
+ pipedrive_id?: string;
58
+ sap_id?: string;
59
+ deleted_at?: Date;
60
+ deleted_by?: import("mongoose").Types.ObjectId;
61
+ date?: Date;
62
+ currency_id?: import("mongoose").Types.ObjectId;
63
+ quote_ref?: string;
64
+ company?: string;
65
+ company_pipedrive_id?: string;
66
+ contact_id?: import("mongoose").Types.ObjectId;
67
+ project_name?: string;
68
+ project_lab?: string;
69
+ payment_condition?: string;
70
+ payment_exp?: string;
71
+ iva?: string;
72
+ sap_quotation_entry?: number;
73
+ sap_order_entry?: number;
74
+ pdf_download_link?: string;
75
+ notes?: string;
76
+ created_by?: import("mongoose").Types.ObjectId;
77
+ updated_by?: import("mongoose").Types.ObjectId;
78
+ }> & {
79
+ quote_number: number;
80
+ quote_revision: number;
81
+ company_id: import("mongoose").Types.ObjectId;
82
+ terms_ids: import("mongoose").Types.ObjectId[];
83
+ status: Status;
84
+ quote_status: QuoteStatus;
85
+ should_sync: boolean;
86
+ created_method: CreatedMethod;
87
+ pipedrive_id?: string;
88
+ sap_id?: string;
89
+ deleted_at?: Date;
90
+ deleted_by?: import("mongoose").Types.ObjectId;
91
+ date?: Date;
92
+ currency_id?: import("mongoose").Types.ObjectId;
93
+ quote_ref?: string;
94
+ company?: string;
95
+ company_pipedrive_id?: string;
96
+ contact_id?: import("mongoose").Types.ObjectId;
97
+ project_name?: string;
98
+ project_lab?: string;
99
+ payment_condition?: string;
100
+ payment_exp?: string;
101
+ iva?: string;
102
+ sap_quotation_entry?: number;
103
+ sap_order_entry?: number;
104
+ pdf_download_link?: string;
105
+ notes?: string;
106
+ created_by?: import("mongoose").Types.ObjectId;
107
+ updated_by?: import("mongoose").Types.ObjectId;
108
+ } & {
109
+ _id: import("mongoose").Types.ObjectId;
110
+ }, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
111
+ timestamps: {
112
+ createdAt: string;
113
+ updatedAt: string;
114
+ };
115
+ }, {
116
+ quote_number: number;
117
+ quote_revision: number;
118
+ company_id: import("mongoose").Types.ObjectId;
119
+ terms_ids: import("mongoose").Types.ObjectId[];
120
+ status: Status;
121
+ quote_status: QuoteStatus;
122
+ should_sync: boolean;
123
+ created_method: CreatedMethod;
124
+ pipedrive_id?: string;
125
+ sap_id?: string;
126
+ deleted_at?: Date;
127
+ deleted_by?: import("mongoose").Types.ObjectId;
128
+ date?: Date;
129
+ currency_id?: import("mongoose").Types.ObjectId;
130
+ quote_ref?: string;
131
+ company?: string;
132
+ company_pipedrive_id?: string;
133
+ contact_id?: import("mongoose").Types.ObjectId;
134
+ project_name?: string;
135
+ project_lab?: string;
136
+ payment_condition?: string;
137
+ payment_exp?: string;
138
+ iva?: string;
139
+ sap_quotation_entry?: number;
140
+ sap_order_entry?: number;
141
+ pdf_download_link?: string;
142
+ notes?: string;
143
+ created_by?: import("mongoose").Types.ObjectId;
144
+ updated_by?: import("mongoose").Types.ObjectId;
145
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
146
+ quote_number: number;
147
+ quote_revision: number;
148
+ company_id: import("mongoose").Types.ObjectId;
149
+ terms_ids: import("mongoose").Types.ObjectId[];
150
+ status: Status;
151
+ quote_status: QuoteStatus;
152
+ should_sync: boolean;
153
+ created_method: CreatedMethod;
154
+ pipedrive_id?: string;
155
+ sap_id?: string;
156
+ deleted_at?: Date;
157
+ deleted_by?: import("mongoose").Types.ObjectId;
158
+ date?: Date;
159
+ currency_id?: import("mongoose").Types.ObjectId;
160
+ quote_ref?: string;
161
+ company?: string;
162
+ company_pipedrive_id?: string;
163
+ contact_id?: import("mongoose").Types.ObjectId;
164
+ project_name?: string;
165
+ project_lab?: string;
166
+ payment_condition?: string;
167
+ payment_exp?: string;
168
+ iva?: string;
169
+ sap_quotation_entry?: number;
170
+ sap_order_entry?: number;
171
+ pdf_download_link?: string;
172
+ notes?: string;
173
+ created_by?: import("mongoose").Types.ObjectId;
174
+ updated_by?: import("mongoose").Types.ObjectId;
175
+ }>> & import("mongoose").FlatRecord<{
176
+ quote_number: number;
177
+ quote_revision: number;
178
+ company_id: import("mongoose").Types.ObjectId;
179
+ terms_ids: import("mongoose").Types.ObjectId[];
180
+ status: Status;
181
+ quote_status: QuoteStatus;
182
+ should_sync: boolean;
183
+ created_method: CreatedMethod;
184
+ pipedrive_id?: string;
185
+ sap_id?: string;
186
+ deleted_at?: Date;
187
+ deleted_by?: import("mongoose").Types.ObjectId;
188
+ date?: Date;
189
+ currency_id?: import("mongoose").Types.ObjectId;
190
+ quote_ref?: string;
191
+ company?: string;
192
+ company_pipedrive_id?: string;
193
+ contact_id?: import("mongoose").Types.ObjectId;
194
+ project_name?: string;
195
+ project_lab?: string;
196
+ payment_condition?: string;
197
+ payment_exp?: string;
198
+ iva?: string;
199
+ sap_quotation_entry?: number;
200
+ sap_order_entry?: number;
201
+ pdf_download_link?: string;
202
+ notes?: string;
203
+ created_by?: import("mongoose").Types.ObjectId;
204
+ updated_by?: import("mongoose").Types.ObjectId;
205
+ }> & {
206
+ _id: import("mongoose").Types.ObjectId;
207
+ }>>;
208
+ export default _default;
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreatedMethod = exports.Status = exports.QuoteStatus = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ var QuoteStatus;
6
+ (function (QuoteStatus) {
7
+ QuoteStatus["OPPORTUNITY"] = "OPPORTUNITY";
8
+ QuoteStatus["QUOTE"] = "QUOTE";
9
+ QuoteStatus["FOLLOWING"] = "FOLLOWING";
10
+ QuoteStatus["NEGOTIATION"] = "NEGOTIATION";
11
+ })(QuoteStatus || (exports.QuoteStatus = QuoteStatus = {}));
12
+ var Status;
13
+ (function (Status) {
14
+ Status["OPEN"] = "OPEN";
15
+ Status["WIN"] = "WIN";
16
+ Status["LOST"] = "LOST";
17
+ Status["DELETE"] = "DELETE";
18
+ })(Status || (exports.Status = Status = {}));
19
+ var CreatedMethod;
20
+ (function (CreatedMethod) {
21
+ CreatedMethod["MANUAL"] = "MANUAL";
22
+ CreatedMethod["CSV"] = "CSV";
23
+ })(CreatedMethod || (exports.CreatedMethod = CreatedMethod = {}));
24
+ const quoteSchema = new mongoose_1.Schema({
25
+ quote_number: { type: Number, required: true },
26
+ quote_revision: { type: Number, default: 0 },
27
+ quote_ref: { type: String },
28
+ company: { type: String },
29
+ company_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "Client", required: true },
30
+ company_pipedrive_id: { type: String },
31
+ contact_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "ClientContact" },
32
+ project_name: { type: String },
33
+ project_lab: { type: String },
34
+ payment_condition: { type: String },
35
+ payment_exp: { type: String },
36
+ terms_ids: [{ type: mongoose_1.Schema.Types.ObjectId, ref: "QuoteTerm" }],
37
+ currency_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "Currency" },
38
+ iva: { type: String },
39
+ date: { type: Date },
40
+ status: { type: String, enum: Object.values(Status), default: Status.OPEN },
41
+ quote_status: {
42
+ type: String,
43
+ enum: Object.values(QuoteStatus),
44
+ default: QuoteStatus.OPPORTUNITY,
45
+ },
46
+ sap_id: { type: String },
47
+ sap_quotation_entry: { type: Number },
48
+ sap_order_entry: { type: Number },
49
+ pipedrive_id: { type: String },
50
+ should_sync: { type: Boolean, default: false },
51
+ pdf_download_link: { type: String },
52
+ notes: { type: String },
53
+ created_method: {
54
+ type: String,
55
+ enum: Object.values(CreatedMethod),
56
+ default: CreatedMethod.MANUAL,
57
+ },
58
+ created_by: { type: mongoose_1.Schema.Types.ObjectId, ref: "User" },
59
+ updated_by: { type: mongoose_1.Schema.Types.ObjectId, ref: "User" },
60
+ deleted_by: { type: mongoose_1.Schema.Types.ObjectId, ref: "User" },
61
+ deleted_at: { type: Date },
62
+ }, { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } });
63
+ exports.default = (0, mongoose_1.model)("Quote", quoteSchema, "quotes");
@@ -0,0 +1,96 @@
1
+ import { Schema } from "mongoose";
2
+ declare const _default: import("mongoose").Model<{
3
+ quote_id: import("mongoose").Types.ObjectId;
4
+ type?: string;
5
+ description?: string;
6
+ article_number?: string;
7
+ article_id?: import("mongoose").Types.ObjectId;
8
+ price?: number;
9
+ delivery?: string;
10
+ quantity?: number;
11
+ unit_price?: number;
12
+ original_price?: number;
13
+ total?: number;
14
+ utility?: number;
15
+ extra_id?: import("mongoose").Types.ObjectId;
16
+ }, {}, {}, {}, import("mongoose").Document<unknown, {}, {
17
+ quote_id: import("mongoose").Types.ObjectId;
18
+ type?: string;
19
+ description?: string;
20
+ article_number?: string;
21
+ article_id?: import("mongoose").Types.ObjectId;
22
+ price?: number;
23
+ delivery?: string;
24
+ quantity?: number;
25
+ unit_price?: number;
26
+ original_price?: number;
27
+ total?: number;
28
+ utility?: number;
29
+ extra_id?: import("mongoose").Types.ObjectId;
30
+ }> & {
31
+ quote_id: import("mongoose").Types.ObjectId;
32
+ type?: string;
33
+ description?: string;
34
+ article_number?: string;
35
+ article_id?: import("mongoose").Types.ObjectId;
36
+ price?: number;
37
+ delivery?: string;
38
+ quantity?: number;
39
+ unit_price?: number;
40
+ original_price?: number;
41
+ total?: number;
42
+ utility?: number;
43
+ extra_id?: import("mongoose").Types.ObjectId;
44
+ } & {
45
+ _id: import("mongoose").Types.ObjectId;
46
+ }, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
47
+ timestamps: {
48
+ createdAt: string;
49
+ updatedAt: string;
50
+ };
51
+ }, {
52
+ quote_id: import("mongoose").Types.ObjectId;
53
+ type?: string;
54
+ description?: string;
55
+ article_number?: string;
56
+ article_id?: import("mongoose").Types.ObjectId;
57
+ price?: number;
58
+ delivery?: string;
59
+ quantity?: number;
60
+ unit_price?: number;
61
+ original_price?: number;
62
+ total?: number;
63
+ utility?: number;
64
+ extra_id?: import("mongoose").Types.ObjectId;
65
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
66
+ quote_id: import("mongoose").Types.ObjectId;
67
+ type?: string;
68
+ description?: string;
69
+ article_number?: string;
70
+ article_id?: import("mongoose").Types.ObjectId;
71
+ price?: number;
72
+ delivery?: string;
73
+ quantity?: number;
74
+ unit_price?: number;
75
+ original_price?: number;
76
+ total?: number;
77
+ utility?: number;
78
+ extra_id?: import("mongoose").Types.ObjectId;
79
+ }>> & import("mongoose").FlatRecord<{
80
+ quote_id: import("mongoose").Types.ObjectId;
81
+ type?: string;
82
+ description?: string;
83
+ article_number?: string;
84
+ article_id?: import("mongoose").Types.ObjectId;
85
+ price?: number;
86
+ delivery?: string;
87
+ quantity?: number;
88
+ unit_price?: number;
89
+ original_price?: number;
90
+ total?: number;
91
+ utility?: number;
92
+ extra_id?: import("mongoose").Types.ObjectId;
93
+ }> & {
94
+ _id: import("mongoose").Types.ObjectId;
95
+ }>>;
96
+ export default _default;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const mongoose_1 = require("mongoose");
4
+ const quoteArticleSchema = new mongoose_1.Schema({
5
+ quote_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "Quote", required: true },
6
+ article_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "Article" },
7
+ article_number: { type: String },
8
+ description: { type: String },
9
+ delivery: { type: String },
10
+ quantity: { type: Number },
11
+ price: { type: Number },
12
+ unit_price: { type: Number },
13
+ original_price: { type: Number },
14
+ total: { type: Number },
15
+ utility: { type: Number },
16
+ type: { type: String },
17
+ extra_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "QuoteArticleExtra" },
18
+ }, { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } });
19
+ exports.default = (0, mongoose_1.model)("QuoteArticle", quoteArticleSchema, "quote_articles");
@@ -0,0 +1,54 @@
1
+ import { Schema } from "mongoose";
2
+ declare const _default: import("mongoose").Model<{
3
+ quote_article_id: import("mongoose").Types.ObjectId;
4
+ multiplier?: number;
5
+ usa_freight?: number;
6
+ usa_expenses?: number;
7
+ duty?: number;
8
+ mex_freight?: number;
9
+ }, {}, {}, {}, import("mongoose").Document<unknown, {}, {
10
+ quote_article_id: import("mongoose").Types.ObjectId;
11
+ multiplier?: number;
12
+ usa_freight?: number;
13
+ usa_expenses?: number;
14
+ duty?: number;
15
+ mex_freight?: number;
16
+ }> & {
17
+ quote_article_id: import("mongoose").Types.ObjectId;
18
+ multiplier?: number;
19
+ usa_freight?: number;
20
+ usa_expenses?: number;
21
+ duty?: number;
22
+ mex_freight?: number;
23
+ } & {
24
+ _id: import("mongoose").Types.ObjectId;
25
+ }, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
26
+ timestamps: {
27
+ createdAt: string;
28
+ updatedAt: string;
29
+ };
30
+ }, {
31
+ quote_article_id: import("mongoose").Types.ObjectId;
32
+ multiplier?: number;
33
+ usa_freight?: number;
34
+ usa_expenses?: number;
35
+ duty?: number;
36
+ mex_freight?: number;
37
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
38
+ quote_article_id: import("mongoose").Types.ObjectId;
39
+ multiplier?: number;
40
+ usa_freight?: number;
41
+ usa_expenses?: number;
42
+ duty?: number;
43
+ mex_freight?: number;
44
+ }>> & import("mongoose").FlatRecord<{
45
+ quote_article_id: import("mongoose").Types.ObjectId;
46
+ multiplier?: number;
47
+ usa_freight?: number;
48
+ usa_expenses?: number;
49
+ duty?: number;
50
+ mex_freight?: number;
51
+ }> & {
52
+ _id: import("mongoose").Types.ObjectId;
53
+ }>>;
54
+ export default _default;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const mongoose_1 = require("mongoose");
4
+ const quoteArticleExtraSchema = new mongoose_1.Schema({
5
+ quote_article_id: {
6
+ type: mongoose_1.Schema.Types.ObjectId,
7
+ ref: "QuoteArticle",
8
+ required: true,
9
+ },
10
+ multiplier: Number,
11
+ usa_freight: Number,
12
+ usa_expenses: Number,
13
+ duty: Number,
14
+ mex_freight: Number,
15
+ }, { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } });
16
+ exports.default = (0, mongoose_1.model)("QuoteArticleExtra", quoteArticleExtraSchema, "quote_article_extras");
@@ -0,0 +1,49 @@
1
+ import { Schema } from "mongoose";
2
+ declare const _default: import("mongoose").Model<{
3
+ created_at: Date;
4
+ quote_id: import("mongoose").Types.ObjectId;
5
+ email?: string;
6
+ pipedrive_id?: string;
7
+ name?: string;
8
+ mobile?: string;
9
+ }, {}, {}, {}, import("mongoose").Document<unknown, {}, {
10
+ created_at: Date;
11
+ quote_id: import("mongoose").Types.ObjectId;
12
+ email?: string;
13
+ pipedrive_id?: string;
14
+ name?: string;
15
+ mobile?: string;
16
+ }> & {
17
+ created_at: Date;
18
+ quote_id: import("mongoose").Types.ObjectId;
19
+ email?: string;
20
+ pipedrive_id?: string;
21
+ name?: string;
22
+ mobile?: string;
23
+ } & {
24
+ _id: import("mongoose").Types.ObjectId;
25
+ }, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
26
+ created_at: Date;
27
+ quote_id: import("mongoose").Types.ObjectId;
28
+ email?: string;
29
+ pipedrive_id?: string;
30
+ name?: string;
31
+ mobile?: string;
32
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
33
+ created_at: Date;
34
+ quote_id: import("mongoose").Types.ObjectId;
35
+ email?: string;
36
+ pipedrive_id?: string;
37
+ name?: string;
38
+ mobile?: string;
39
+ }>> & import("mongoose").FlatRecord<{
40
+ created_at: Date;
41
+ quote_id: import("mongoose").Types.ObjectId;
42
+ email?: string;
43
+ pipedrive_id?: string;
44
+ name?: string;
45
+ mobile?: string;
46
+ }> & {
47
+ _id: import("mongoose").Types.ObjectId;
48
+ }>>;
49
+ export default _default;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const mongoose_1 = require("mongoose");
4
+ const quoteContactSchema = new mongoose_1.Schema({
5
+ quote_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "Quote", required: true },
6
+ name: String,
7
+ email: String,
8
+ mobile: String,
9
+ pipedrive_id: String,
10
+ created_at: { type: Date, default: Date.now },
11
+ });
12
+ exports.default = (0, mongoose_1.model)("QuoteContact", quoteContactSchema, "quote_contacts");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fesmex/models",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [