@managesome/eposmatic-toolkit 0.2.426 → 0.2.429
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/lib/constants/RFQ.js +8 -8
- package/lib/schemas/models/applied_order_discounts.d.ts +80 -0
- package/lib/schemas/models/applied_order_discounts.js +106 -0
- package/lib/schemas/models/brands.d.ts +45 -0
- package/lib/schemas/models/brands.js +45 -0
- package/lib/schemas/models/categories.d.ts +60 -0
- package/lib/schemas/models/categories.js +67 -0
- package/lib/schemas/models/close_dates.js +2 -2
- package/lib/schemas/models/dinein_tables.d.ts +6 -6
- package/lib/schemas/models/dinein_tables_fingerprints.d.ts +65 -0
- package/lib/schemas/models/dinein_tables_fingerprints.js +85 -0
- package/lib/schemas/models/discounts.js +3 -3
- package/lib/schemas/models/expense_categories.d.ts +83 -0
- package/lib/schemas/models/expense_categories.js +64 -0
- package/lib/schemas/models/halfhalf_setup.js +3 -3
- package/lib/schemas/models/index.d.ts +23 -23
- package/lib/schemas/models/index.js +23 -23
- package/lib/schemas/models/inventories.d.ts +99 -0
- package/lib/schemas/models/inventories.js +87 -0
- package/lib/schemas/models/inventory_lot_serial_numbers.d.ts +15 -15
- package/lib/schemas/models/items.d.ts +11269 -0
- package/lib/schemas/models/items.js +333 -0
- package/lib/schemas/models/menus.d.ts +941 -0
- package/lib/schemas/models/menus.js +69 -0
- package/lib/schemas/models/offers.js +3 -3
- package/lib/schemas/models/orders.d.ts +15437 -0
- package/lib/schemas/models/orders.js +891 -0
- package/lib/schemas/models/public_holidays.js +2 -2
- package/lib/schemas/models/purchase_order_receipts.d.ts +3 -3
- package/lib/schemas/models/purchase_order_receipts.js +2 -2
- package/lib/schemas/models/purchase_order_rfqs.d.ts +1959 -0
- package/lib/schemas/models/purchase_order_rfqs.js +328 -0
- package/lib/schemas/models/purchase_order_vendor_returns.d.ts +15 -15
- package/lib/schemas/models/purchase_order_vendor_returns.js +2 -2
- package/lib/schemas/models/purchase_orders.js +4 -4
- package/lib/schemas/models/riders.d.ts +65 -0
- package/lib/schemas/models/riders.js +74 -0
- package/lib/schemas/models/specials.js +3 -3
- package/lib/schemas/models/tenant_staffs.d.ts +932 -0
- package/lib/schemas/models/tenant_staffs.js +96 -0
- package/lib/schemas/models/tenants.d.ts +528 -0
- package/lib/schemas/models/tenants.js +755 -0
- package/lib/schemas/models/track_order_numbers.d.ts +413 -0
- package/lib/schemas/models/track_order_numbers.js +45 -0
- package/lib/schemas/models/void_purchase_order_items.js +2 -2
- package/lib/schemas/models/void_warehouse_invoice_items.d.ts +6 -6
- package/lib/schemas/models/void_warehouse_invoice_items.js +2 -2
- package/lib/schemas/models/wallets.d.ts +38 -0
- package/lib/schemas/models/wallets.js +37 -0
- package/lib/schemas/models/warehouse-activity-logs.js +2 -2
- package/lib/schemas/models/warehouse_communications.d.ts +228 -0
- package/lib/schemas/models/warehouse_communications.js +216 -0
- package/lib/schemas/models/warehouse_internal_movements.d.ts +33 -34
- package/lib/schemas/models/warehouse_internal_movements.js +2 -34
- package/lib/schemas/models/warehouse_invoices.js +2 -2
- package/lib/schemas/models/warehouse_items.js +2 -2
- package/lib/schemas/models/warehouse_sale_deliveries.d.ts +167 -0
- package/lib/schemas/models/warehouse_sale_deliveries.js +155 -0
- package/lib/schemas/models/warehouse_sale_invoices.d.ts +227 -0
- package/lib/schemas/models/warehouse_sale_invoices.js +206 -0
- package/lib/schemas/models/warehouse_sale_order_rfqs.d.ts +1938 -0
- package/lib/schemas/models/warehouse_sale_order_rfqs.js +309 -0
- package/lib/schemas/models/warehouse_sale_orders.d.ts +1943 -0
- package/lib/schemas/models/warehouse_sale_orders.js +324 -0
- package/lib/schemas/models/warehouse_staffs.d.ts +65 -0
- package/lib/schemas/models/warehouse_staffs.js +78 -0
- package/lib/schemas/models/warehouse_track_order_numbers.d.ts +50 -0
- package/lib/schemas/models/warehouse_track_order_numbers.js +52 -0
- package/lib/schemas/models/warehouse_vendors.d.ts +3 -3
- package/lib/schemas/models/warehouses.d.ts +162 -0
- package/lib/schemas/models/warehouses.js +222 -0
- package/lib/schemas/types/applied_order_discounts.d.ts +22 -0
- package/lib/schemas/types/applied_order_discounts.js +2 -0
- package/lib/schemas/types/brands.d.ts +32 -0
- package/lib/schemas/types/brands.js +2 -0
- package/lib/schemas/types/categories.d.ts +15 -0
- package/lib/schemas/types/categories.js +2 -0
- package/lib/schemas/types/deliveries.d.ts +1 -1
- package/lib/schemas/types/expense_categories.d.ts +20 -0
- package/lib/schemas/types/expense_categories.js +2 -0
- package/lib/schemas/types/expense_details.d.ts +1 -1
- package/lib/schemas/types/index.d.ts +22 -22
- package/lib/schemas/types/index.js +22 -22
- package/lib/schemas/types/inventories.d.ts +48 -0
- package/lib/schemas/types/inventories.js +2 -0
- package/lib/schemas/types/items.d.ts +89 -0
- package/lib/schemas/types/items.js +2 -0
- package/lib/schemas/types/menus.d.ts +17 -0
- package/lib/schemas/types/menus.js +2 -0
- package/lib/schemas/types/multi_tenants.d.ts +2 -2
- package/lib/schemas/types/orders.d.ts +242 -0
- package/lib/schemas/types/orders.js +2 -0
- package/lib/schemas/types/purchase_order_common.d.ts +1 -1
- package/lib/schemas/types/purchase_order_rfqs.d.ts +33 -0
- package/lib/schemas/types/purchase_order_rfqs.js +2 -0
- package/lib/schemas/types/purchase_orders.d.ts +1 -1
- package/lib/schemas/types/reservations.d.ts +1 -1
- package/lib/schemas/types/riders.d.ts +16 -0
- package/lib/schemas/types/riders.js +2 -0
- package/lib/schemas/types/sale_order_common.d.ts +1 -1
- package/lib/schemas/types/specials.d.ts +1 -1
- package/lib/schemas/types/tenant_staffs.d.ts +22 -0
- package/lib/schemas/types/tenant_staffs.js +2 -0
- package/lib/schemas/types/tenants.d.ts +205 -0
- package/lib/schemas/types/tenants.js +2 -0
- package/lib/schemas/types/track_order_numbers.d.ts +10 -0
- package/lib/schemas/types/track_order_numbers.js +2 -0
- package/lib/schemas/types/wallets.d.ts +7 -0
- package/lib/schemas/types/wallets.js +2 -0
- package/lib/schemas/types/warehouse_communications.d.ts +54 -0
- package/lib/schemas/types/warehouse_communications.js +2 -0
- package/lib/schemas/types/warehouse_internal_movements.d.ts +2 -2
- package/lib/schemas/types/warehouse_invoices.d.ts +1 -1
- package/lib/schemas/types/warehouse_sale_deliveries.d.ts +67 -0
- package/lib/schemas/types/warehouse_sale_deliveries.js +2 -0
- package/lib/schemas/types/warehouse_sale_invoices.d.ts +49 -0
- package/lib/schemas/types/warehouse_sale_invoices.js +2 -0
- package/lib/schemas/types/warehouse_sale_order_rfqs.d.ts +25 -0
- package/lib/schemas/types/warehouse_sale_order_rfqs.js +2 -0
- package/lib/schemas/types/warehouse_sale_orders.d.ts +30 -0
- package/lib/schemas/types/warehouse_sale_orders.js +2 -0
- package/lib/schemas/types/warehouse_staffs.d.ts +17 -0
- package/lib/schemas/types/warehouse_staffs.js +2 -0
- package/lib/schemas/types/warehouse_track_order_numbers.d.ts +11 -0
- package/lib/schemas/types/warehouse_track_order_numbers.js +2 -0
- package/lib/schemas/types/warehouses.d.ts +49 -0
- package/lib/schemas/types/warehouses.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SALE_ORDER_COLLECTION_NAME = exports.SaleOrdersSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
const warehouse_categories_1 = require("./warehouse_categories");
|
|
7
|
+
const warehouse_clients_1 = require("./warehouse_clients");
|
|
8
|
+
const warehouse_items_1 = require("./warehouse_items");
|
|
9
|
+
const warehouse_sale_order_rfqs_1 = require("./warehouse_sale_order_rfqs");
|
|
10
|
+
const warehouses_1 = require("./warehouses");
|
|
11
|
+
const StaffDetailsSchema = new mongoose_1.Schema({
|
|
12
|
+
staff_id: {
|
|
13
|
+
type: String,
|
|
14
|
+
required: true,
|
|
15
|
+
},
|
|
16
|
+
staff_name: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: '',
|
|
19
|
+
},
|
|
20
|
+
staff_mobile: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: null,
|
|
23
|
+
},
|
|
24
|
+
staff_email: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: null,
|
|
27
|
+
},
|
|
28
|
+
}, { _id: false, minimize: false });
|
|
29
|
+
const SaleOrderItemsSchema = new mongoose_1.Schema({
|
|
30
|
+
_id: {
|
|
31
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
32
|
+
required: true,
|
|
33
|
+
immutable: true,
|
|
34
|
+
},
|
|
35
|
+
item_id: {
|
|
36
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
37
|
+
required: true,
|
|
38
|
+
immutable: true,
|
|
39
|
+
ref: warehouse_items_1.WAREHOUSE_ITEMS_COLLECTION_NAME,
|
|
40
|
+
},
|
|
41
|
+
is_ready: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
required: false,
|
|
44
|
+
},
|
|
45
|
+
void_reason: {
|
|
46
|
+
type: String,
|
|
47
|
+
required: false,
|
|
48
|
+
},
|
|
49
|
+
name: {
|
|
50
|
+
type: String,
|
|
51
|
+
required: true,
|
|
52
|
+
},
|
|
53
|
+
quantity: {
|
|
54
|
+
type: Number,
|
|
55
|
+
min: 0,
|
|
56
|
+
required: true,
|
|
57
|
+
},
|
|
58
|
+
price: {
|
|
59
|
+
type: Number,
|
|
60
|
+
min: 0,
|
|
61
|
+
required: true,
|
|
62
|
+
},
|
|
63
|
+
subtotal: {
|
|
64
|
+
type: Number,
|
|
65
|
+
min: 0,
|
|
66
|
+
required: true,
|
|
67
|
+
},
|
|
68
|
+
_net_amount: {
|
|
69
|
+
type: Number,
|
|
70
|
+
min: 0,
|
|
71
|
+
required: true,
|
|
72
|
+
},
|
|
73
|
+
_gross_amount: {
|
|
74
|
+
type: Number,
|
|
75
|
+
min: 0,
|
|
76
|
+
required: true,
|
|
77
|
+
},
|
|
78
|
+
_gst_amount: {
|
|
79
|
+
type: Number,
|
|
80
|
+
min: 0,
|
|
81
|
+
required: true,
|
|
82
|
+
},
|
|
83
|
+
_discount_amount: {
|
|
84
|
+
type: Number,
|
|
85
|
+
min: 0,
|
|
86
|
+
required: true,
|
|
87
|
+
},
|
|
88
|
+
special_instructions: {
|
|
89
|
+
type: String,
|
|
90
|
+
default: '',
|
|
91
|
+
},
|
|
92
|
+
}, {
|
|
93
|
+
_id: false,
|
|
94
|
+
minimize: false,
|
|
95
|
+
});
|
|
96
|
+
const SaleOrderCategoriesSchema = new mongoose_1.Schema({
|
|
97
|
+
category_id: {
|
|
98
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
99
|
+
required: true,
|
|
100
|
+
immutable: true,
|
|
101
|
+
ref: warehouse_categories_1.WAREHOUSE_CATEGORY_COLLECTION_NAME,
|
|
102
|
+
},
|
|
103
|
+
name: {
|
|
104
|
+
type: String,
|
|
105
|
+
required: true,
|
|
106
|
+
},
|
|
107
|
+
items: {
|
|
108
|
+
type: [SaleOrderItemsSchema],
|
|
109
|
+
default: [],
|
|
110
|
+
},
|
|
111
|
+
}, {
|
|
112
|
+
_id: false,
|
|
113
|
+
minimize: false,
|
|
114
|
+
});
|
|
115
|
+
const SaleOrderIterationSchema = new mongoose_1.Schema({
|
|
116
|
+
categories: {
|
|
117
|
+
type: [SaleOrderCategoriesSchema],
|
|
118
|
+
required: true,
|
|
119
|
+
},
|
|
120
|
+
special_instructions: {
|
|
121
|
+
type: String,
|
|
122
|
+
default: '',
|
|
123
|
+
},
|
|
124
|
+
order_status: {
|
|
125
|
+
type: String,
|
|
126
|
+
enum: constants_1.ALL_SALES_ORDER_STATUS_NAMES,
|
|
127
|
+
required: true,
|
|
128
|
+
},
|
|
129
|
+
price: {
|
|
130
|
+
type: Number,
|
|
131
|
+
min: 0,
|
|
132
|
+
required: true,
|
|
133
|
+
},
|
|
134
|
+
amount_earned: {
|
|
135
|
+
type: Number,
|
|
136
|
+
min: 0,
|
|
137
|
+
required: true,
|
|
138
|
+
},
|
|
139
|
+
grand_total: {
|
|
140
|
+
type: Number,
|
|
141
|
+
min: 0,
|
|
142
|
+
required: true,
|
|
143
|
+
},
|
|
144
|
+
staff_details: {
|
|
145
|
+
type: StaffDetailsSchema,
|
|
146
|
+
required: false,
|
|
147
|
+
},
|
|
148
|
+
gst: {
|
|
149
|
+
type: Number,
|
|
150
|
+
min: 0,
|
|
151
|
+
required: false,
|
|
152
|
+
},
|
|
153
|
+
gst_amount: {
|
|
154
|
+
type: Number,
|
|
155
|
+
min: 0,
|
|
156
|
+
required: false,
|
|
157
|
+
},
|
|
158
|
+
is_gst_inclusive: {
|
|
159
|
+
type: Boolean,
|
|
160
|
+
required: false,
|
|
161
|
+
},
|
|
162
|
+
tax_number: {
|
|
163
|
+
type: String,
|
|
164
|
+
default: '',
|
|
165
|
+
},
|
|
166
|
+
updatedAt: {
|
|
167
|
+
type: mongoose_1.Schema.Types.Date,
|
|
168
|
+
required: true,
|
|
169
|
+
},
|
|
170
|
+
}, {
|
|
171
|
+
_id: false,
|
|
172
|
+
timestamps: false,
|
|
173
|
+
versionKey: false,
|
|
174
|
+
});
|
|
175
|
+
exports.SaleOrdersSchema = new mongoose_1.Schema({
|
|
176
|
+
_id: {
|
|
177
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
178
|
+
required: true,
|
|
179
|
+
immutable: true,
|
|
180
|
+
},
|
|
181
|
+
warehouse_id: {
|
|
182
|
+
type: String,
|
|
183
|
+
required: true,
|
|
184
|
+
ref: warehouses_1.WAREHOUSE_SETTINGS_COLLECTION_NAME,
|
|
185
|
+
},
|
|
186
|
+
client_id: {
|
|
187
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
188
|
+
required: true,
|
|
189
|
+
ref: warehouse_clients_1.WAREHOUSE_CLIENTS_COLLECTION_NAME,
|
|
190
|
+
},
|
|
191
|
+
client_name: {
|
|
192
|
+
type: String,
|
|
193
|
+
default: '',
|
|
194
|
+
},
|
|
195
|
+
rfq_id: {
|
|
196
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
197
|
+
required: false,
|
|
198
|
+
ref: warehouse_sale_order_rfqs_1.SALE_ORDER_RFQ_COLLECTION_NAME,
|
|
199
|
+
},
|
|
200
|
+
categories: {
|
|
201
|
+
type: [SaleOrderCategoriesSchema],
|
|
202
|
+
default: [],
|
|
203
|
+
},
|
|
204
|
+
iterations: {
|
|
205
|
+
type: [SaleOrderIterationSchema],
|
|
206
|
+
default: [],
|
|
207
|
+
},
|
|
208
|
+
special_instructions: {
|
|
209
|
+
type: String,
|
|
210
|
+
default: '',
|
|
211
|
+
},
|
|
212
|
+
order_status: {
|
|
213
|
+
type: String,
|
|
214
|
+
enum: constants_1.ALL_SALES_ORDER_STATUS_NAMES,
|
|
215
|
+
required: true,
|
|
216
|
+
},
|
|
217
|
+
tax_number: {
|
|
218
|
+
type: String,
|
|
219
|
+
default: '',
|
|
220
|
+
},
|
|
221
|
+
gst: {
|
|
222
|
+
type: Number,
|
|
223
|
+
min: 0,
|
|
224
|
+
required: false,
|
|
225
|
+
},
|
|
226
|
+
gst_amount: {
|
|
227
|
+
type: Number,
|
|
228
|
+
min: 0,
|
|
229
|
+
required: false,
|
|
230
|
+
},
|
|
231
|
+
is_gst_inclusive: {
|
|
232
|
+
type: Boolean,
|
|
233
|
+
required: false,
|
|
234
|
+
},
|
|
235
|
+
price: {
|
|
236
|
+
type: Number,
|
|
237
|
+
min: 0,
|
|
238
|
+
required: true,
|
|
239
|
+
},
|
|
240
|
+
amount_earned: {
|
|
241
|
+
type: Number,
|
|
242
|
+
min: 0,
|
|
243
|
+
required: true,
|
|
244
|
+
},
|
|
245
|
+
amount_collected: {
|
|
246
|
+
type: Number,
|
|
247
|
+
min: 0,
|
|
248
|
+
required: true,
|
|
249
|
+
default: 0,
|
|
250
|
+
},
|
|
251
|
+
grand_total: {
|
|
252
|
+
type: Number,
|
|
253
|
+
min: 0,
|
|
254
|
+
required: true,
|
|
255
|
+
},
|
|
256
|
+
order_number: {
|
|
257
|
+
type: Number,
|
|
258
|
+
min: 0,
|
|
259
|
+
default: null,
|
|
260
|
+
},
|
|
261
|
+
delete_reason: {
|
|
262
|
+
type: String,
|
|
263
|
+
required: false,
|
|
264
|
+
},
|
|
265
|
+
cancel_reason: {
|
|
266
|
+
type: String,
|
|
267
|
+
required: false,
|
|
268
|
+
},
|
|
269
|
+
staff_details: {
|
|
270
|
+
type: StaffDetailsSchema,
|
|
271
|
+
required: true,
|
|
272
|
+
},
|
|
273
|
+
is_deleted: {
|
|
274
|
+
type: Boolean,
|
|
275
|
+
default: false,
|
|
276
|
+
},
|
|
277
|
+
order_status_updated_at: {
|
|
278
|
+
type: mongoose_1.Schema.Types.Date,
|
|
279
|
+
required: true,
|
|
280
|
+
default: () => new Date(),
|
|
281
|
+
},
|
|
282
|
+
is_reopened: {
|
|
283
|
+
type: Boolean,
|
|
284
|
+
required: false,
|
|
285
|
+
},
|
|
286
|
+
order_settled_at: {
|
|
287
|
+
type: mongoose_1.Schema.Types.Date,
|
|
288
|
+
required: true,
|
|
289
|
+
default: () => new Date(),
|
|
290
|
+
},
|
|
291
|
+
order_settled_at_mins: {
|
|
292
|
+
type: Number,
|
|
293
|
+
required: true,
|
|
294
|
+
default: () => {
|
|
295
|
+
const date = new Date();
|
|
296
|
+
return Math.floor(date.getHours() * 60 + date.getMinutes());
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
createdAt_mins: {
|
|
300
|
+
type: Number,
|
|
301
|
+
required: true,
|
|
302
|
+
immutable: true,
|
|
303
|
+
default: () => {
|
|
304
|
+
const date = new Date();
|
|
305
|
+
return Math.floor(date.getHours() * 60 + date.getMinutes());
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
createdAt: {
|
|
309
|
+
type: mongoose_1.Schema.Types.Date,
|
|
310
|
+
required: true,
|
|
311
|
+
default: () => new Date(),
|
|
312
|
+
immutable: true,
|
|
313
|
+
},
|
|
314
|
+
updatedAt: {
|
|
315
|
+
type: mongoose_1.Schema.Types.Date,
|
|
316
|
+
required: true,
|
|
317
|
+
default: () => new Date(),
|
|
318
|
+
},
|
|
319
|
+
}, {
|
|
320
|
+
timestamps: true,
|
|
321
|
+
versionKey: false,
|
|
322
|
+
minimize: false,
|
|
323
|
+
});
|
|
324
|
+
exports.SALE_ORDER_COLLECTION_NAME = 'warehouse_sale_orders';
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
export declare const WarehouseStaffSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
3
|
+
timestamps: true;
|
|
4
|
+
versionKey: false;
|
|
5
|
+
minimize: false;
|
|
6
|
+
}, {
|
|
7
|
+
createdAt: NativeDate;
|
|
8
|
+
updatedAt: NativeDate;
|
|
9
|
+
} & {
|
|
10
|
+
_id: import("mongoose").Types.ObjectId;
|
|
11
|
+
createdAt: NativeDate;
|
|
12
|
+
updatedAt: NativeDate;
|
|
13
|
+
image_url: string;
|
|
14
|
+
phone_number: string;
|
|
15
|
+
uid: string;
|
|
16
|
+
display_name: string;
|
|
17
|
+
email: string;
|
|
18
|
+
email_verified: boolean;
|
|
19
|
+
phone_number_verified: boolean;
|
|
20
|
+
is_disabled: boolean;
|
|
21
|
+
warehouse_id: string;
|
|
22
|
+
staff_auth_code: string;
|
|
23
|
+
role: import("../../constants").USER_ROLES_ENUM;
|
|
24
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
25
|
+
createdAt: NativeDate;
|
|
26
|
+
updatedAt: NativeDate;
|
|
27
|
+
} & {
|
|
28
|
+
_id: import("mongoose").Types.ObjectId;
|
|
29
|
+
createdAt: NativeDate;
|
|
30
|
+
updatedAt: NativeDate;
|
|
31
|
+
image_url: string;
|
|
32
|
+
phone_number: string;
|
|
33
|
+
uid: string;
|
|
34
|
+
display_name: string;
|
|
35
|
+
email: string;
|
|
36
|
+
email_verified: boolean;
|
|
37
|
+
phone_number_verified: boolean;
|
|
38
|
+
is_disabled: boolean;
|
|
39
|
+
warehouse_id: string;
|
|
40
|
+
staff_auth_code: string;
|
|
41
|
+
role: import("../../constants").USER_ROLES_ENUM;
|
|
42
|
+
}>> & import("mongoose").FlatRecord<{
|
|
43
|
+
createdAt: NativeDate;
|
|
44
|
+
updatedAt: NativeDate;
|
|
45
|
+
} & {
|
|
46
|
+
_id: import("mongoose").Types.ObjectId;
|
|
47
|
+
createdAt: NativeDate;
|
|
48
|
+
updatedAt: NativeDate;
|
|
49
|
+
image_url: string;
|
|
50
|
+
phone_number: string;
|
|
51
|
+
uid: string;
|
|
52
|
+
display_name: string;
|
|
53
|
+
email: string;
|
|
54
|
+
email_verified: boolean;
|
|
55
|
+
phone_number_verified: boolean;
|
|
56
|
+
is_disabled: boolean;
|
|
57
|
+
warehouse_id: string;
|
|
58
|
+
staff_auth_code: string;
|
|
59
|
+
role: import("../../constants").USER_ROLES_ENUM;
|
|
60
|
+
}> & Required<{
|
|
61
|
+
_id: import("mongoose").Types.ObjectId;
|
|
62
|
+
}> & {
|
|
63
|
+
__v: number;
|
|
64
|
+
}>;
|
|
65
|
+
export declare const WAREHOUSE_STAFF_COLLECTION_NAME = "warehouse_staffs";
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WAREHOUSE_STAFF_COLLECTION_NAME = exports.WarehouseStaffSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
exports.WarehouseStaffSchema = new mongoose_1.Schema({
|
|
7
|
+
_id: {
|
|
8
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
9
|
+
required: true,
|
|
10
|
+
immutable: true,
|
|
11
|
+
},
|
|
12
|
+
uid: {
|
|
13
|
+
type: String,
|
|
14
|
+
required: true,
|
|
15
|
+
immutable: true,
|
|
16
|
+
},
|
|
17
|
+
warehouse_id: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true,
|
|
20
|
+
immutable: true,
|
|
21
|
+
ref: 'warehouses',
|
|
22
|
+
},
|
|
23
|
+
staff_auth_code: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: null,
|
|
26
|
+
},
|
|
27
|
+
email: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: null,
|
|
30
|
+
},
|
|
31
|
+
email_verified: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: false,
|
|
34
|
+
},
|
|
35
|
+
display_name: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: null,
|
|
38
|
+
},
|
|
39
|
+
image_url: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: null,
|
|
42
|
+
},
|
|
43
|
+
is_disabled: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: false,
|
|
46
|
+
},
|
|
47
|
+
phone_number: {
|
|
48
|
+
type: String,
|
|
49
|
+
required: true,
|
|
50
|
+
minlength: 10,
|
|
51
|
+
immutable: true,
|
|
52
|
+
},
|
|
53
|
+
phone_number_verified: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: false,
|
|
56
|
+
},
|
|
57
|
+
role: {
|
|
58
|
+
type: String,
|
|
59
|
+
required: true,
|
|
60
|
+
enum: constants_1.ALL_USER_ROLES,
|
|
61
|
+
},
|
|
62
|
+
createdAt: {
|
|
63
|
+
type: Date,
|
|
64
|
+
required: true,
|
|
65
|
+
immutable: true,
|
|
66
|
+
default: () => new Date(),
|
|
67
|
+
},
|
|
68
|
+
updatedAt: {
|
|
69
|
+
type: Date,
|
|
70
|
+
required: true,
|
|
71
|
+
default: () => new Date(),
|
|
72
|
+
},
|
|
73
|
+
}, {
|
|
74
|
+
timestamps: true,
|
|
75
|
+
versionKey: false,
|
|
76
|
+
minimize: false,
|
|
77
|
+
});
|
|
78
|
+
exports.WAREHOUSE_STAFF_COLLECTION_NAME = 'warehouse_staffs';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
export declare const WarehouseTrackOrderNumberSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
3
|
+
timestamps: true;
|
|
4
|
+
versionKey: false;
|
|
5
|
+
minimize: false;
|
|
6
|
+
}, {
|
|
7
|
+
createdAt: NativeDate;
|
|
8
|
+
updatedAt: NativeDate;
|
|
9
|
+
} & {
|
|
10
|
+
_id: string;
|
|
11
|
+
createdAt: NativeDate;
|
|
12
|
+
updatedAt: NativeDate;
|
|
13
|
+
PO_YEAR: number;
|
|
14
|
+
PO_MONTH: number;
|
|
15
|
+
PO_DAY: number;
|
|
16
|
+
INVOICE_YEAR: number;
|
|
17
|
+
INVOICE_MONTH: number;
|
|
18
|
+
INVOICE_DAY: number;
|
|
19
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
20
|
+
createdAt: NativeDate;
|
|
21
|
+
updatedAt: NativeDate;
|
|
22
|
+
} & {
|
|
23
|
+
_id: string;
|
|
24
|
+
createdAt: NativeDate;
|
|
25
|
+
updatedAt: NativeDate;
|
|
26
|
+
PO_YEAR: number;
|
|
27
|
+
PO_MONTH: number;
|
|
28
|
+
PO_DAY: number;
|
|
29
|
+
INVOICE_YEAR: number;
|
|
30
|
+
INVOICE_MONTH: number;
|
|
31
|
+
INVOICE_DAY: number;
|
|
32
|
+
}>> & import("mongoose").FlatRecord<{
|
|
33
|
+
createdAt: NativeDate;
|
|
34
|
+
updatedAt: NativeDate;
|
|
35
|
+
} & {
|
|
36
|
+
_id: string;
|
|
37
|
+
createdAt: NativeDate;
|
|
38
|
+
updatedAt: NativeDate;
|
|
39
|
+
PO_YEAR: number;
|
|
40
|
+
PO_MONTH: number;
|
|
41
|
+
PO_DAY: number;
|
|
42
|
+
INVOICE_YEAR: number;
|
|
43
|
+
INVOICE_MONTH: number;
|
|
44
|
+
INVOICE_DAY: number;
|
|
45
|
+
}> & Required<{
|
|
46
|
+
_id: string;
|
|
47
|
+
}> & {
|
|
48
|
+
__v: number;
|
|
49
|
+
}>;
|
|
50
|
+
export declare const WAREHOUSE_TRACK_ORDER_NUMBERS_COLLECTION_NAME = "warehouse_track_order_numbers";
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WAREHOUSE_TRACK_ORDER_NUMBERS_COLLECTION_NAME = exports.WarehouseTrackOrderNumberSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
exports.WarehouseTrackOrderNumberSchema = new mongoose_1.Schema({
|
|
6
|
+
_id: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
9
|
+
immutable: true,
|
|
10
|
+
ref: 'warehouses',
|
|
11
|
+
},
|
|
12
|
+
PO_YEAR: {
|
|
13
|
+
type: Number,
|
|
14
|
+
default: 0,
|
|
15
|
+
},
|
|
16
|
+
PO_MONTH: {
|
|
17
|
+
type: Number,
|
|
18
|
+
default: 0,
|
|
19
|
+
},
|
|
20
|
+
PO_DAY: {
|
|
21
|
+
type: Number,
|
|
22
|
+
default: 0,
|
|
23
|
+
},
|
|
24
|
+
INVOICE_YEAR: {
|
|
25
|
+
type: Number,
|
|
26
|
+
default: 0,
|
|
27
|
+
},
|
|
28
|
+
INVOICE_MONTH: {
|
|
29
|
+
type: Number,
|
|
30
|
+
default: 0,
|
|
31
|
+
},
|
|
32
|
+
INVOICE_DAY: {
|
|
33
|
+
type: Number,
|
|
34
|
+
default: 0,
|
|
35
|
+
},
|
|
36
|
+
createdAt: {
|
|
37
|
+
type: mongoose_1.Schema.Types.Date,
|
|
38
|
+
required: true,
|
|
39
|
+
default: () => new Date(),
|
|
40
|
+
immutable: true,
|
|
41
|
+
},
|
|
42
|
+
updatedAt: {
|
|
43
|
+
type: mongoose_1.Schema.Types.Date,
|
|
44
|
+
required: true,
|
|
45
|
+
default: () => new Date(),
|
|
46
|
+
},
|
|
47
|
+
}, {
|
|
48
|
+
timestamps: true,
|
|
49
|
+
versionKey: false,
|
|
50
|
+
minimize: false,
|
|
51
|
+
});
|
|
52
|
+
exports.WAREHOUSE_TRACK_ORDER_NUMBERS_COLLECTION_NAME = 'warehouse_track_order_numbers';
|
|
@@ -27,8 +27,8 @@ export declare const WarehouseVendorsSchema: Schema<any, import("mongoose").Mode
|
|
|
27
27
|
phone_number: string;
|
|
28
28
|
uid: string;
|
|
29
29
|
email: string;
|
|
30
|
-
tax_business_number: string;
|
|
31
30
|
warehouse_id: string;
|
|
31
|
+
tax_business_number: string;
|
|
32
32
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
33
33
|
createdAt: NativeDate;
|
|
34
34
|
updatedAt: NativeDate;
|
|
@@ -53,8 +53,8 @@ export declare const WarehouseVendorsSchema: Schema<any, import("mongoose").Mode
|
|
|
53
53
|
phone_number: string;
|
|
54
54
|
uid: string;
|
|
55
55
|
email: string;
|
|
56
|
-
tax_business_number: string;
|
|
57
56
|
warehouse_id: string;
|
|
57
|
+
tax_business_number: string;
|
|
58
58
|
}>> & import("mongoose").FlatRecord<{
|
|
59
59
|
createdAt: NativeDate;
|
|
60
60
|
updatedAt: NativeDate;
|
|
@@ -79,8 +79,8 @@ export declare const WarehouseVendorsSchema: Schema<any, import("mongoose").Mode
|
|
|
79
79
|
phone_number: string;
|
|
80
80
|
uid: string;
|
|
81
81
|
email: string;
|
|
82
|
-
tax_business_number: string;
|
|
83
82
|
warehouse_id: string;
|
|
83
|
+
tax_business_number: string;
|
|
84
84
|
}> & Required<{
|
|
85
85
|
_id: import("mongoose").Types.ObjectId;
|
|
86
86
|
}> & {
|