@managesome/eposmatic-toolkit 0.2.519 → 0.2.521
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/schemas/models/index.d.ts +3 -0
- package/lib/schemas/models/index.js +3 -0
- package/lib/schemas/models/inventories.d.ts +9 -0
- package/lib/schemas/models/inventory_department_transactions.d.ts +86 -0
- package/lib/schemas/models/inventory_department_transactions.js +116 -0
- package/lib/schemas/models/inventory_department_utilities.d.ts +108 -0
- package/lib/schemas/models/inventory_department_utilities.js +88 -0
- package/lib/schemas/models/inventory_departments.d.ts +53 -0
- package/lib/schemas/models/inventory_departments.js +58 -0
- package/lib/schemas/models/inventory_transactions.d.ts +3 -0
- package/lib/schemas/models/inventory_transactions.js +5 -0
- package/lib/schemas/models/items.d.ts +93 -0
- package/lib/schemas/models/items.js +5 -0
- package/lib/schemas/models/warehouse_items.d.ts +9 -0
- package/lib/schemas/types/common.d.ts +1 -0
- package/lib/schemas/types/index.d.ts +3 -0
- package/lib/schemas/types/index.js +3 -0
- package/lib/schemas/types/inventory_department_transactions.d.ts +24 -0
- package/lib/schemas/types/inventory_department_transactions.js +2 -0
- package/lib/schemas/types/inventory_department_utilities.d.ts +50 -0
- package/lib/schemas/types/inventory_department_utilities.js +2 -0
- package/lib/schemas/types/inventory_departments.d.ts +12 -0
- package/lib/schemas/types/inventory_departments.js +2 -0
- package/lib/schemas/types/inventory_transactions.d.ts +1 -0
- package/package.json +1 -1
|
@@ -29,6 +29,9 @@ export * from './internal_operational_roles';
|
|
|
29
29
|
export * from './internal_staffs';
|
|
30
30
|
export * from './inventories';
|
|
31
31
|
export * from './inventory_categories';
|
|
32
|
+
export * from './inventory_department_transactions';
|
|
33
|
+
export * from './inventory_department_utilities';
|
|
34
|
+
export * from './inventory_departments';
|
|
32
35
|
export * from './inventory_transactions';
|
|
33
36
|
export * from './item_transactions';
|
|
34
37
|
export * from './items';
|
|
@@ -45,6 +45,9 @@ __exportStar(require("./internal_operational_roles"), exports);
|
|
|
45
45
|
__exportStar(require("./internal_staffs"), exports);
|
|
46
46
|
__exportStar(require("./inventories"), exports);
|
|
47
47
|
__exportStar(require("./inventory_categories"), exports);
|
|
48
|
+
__exportStar(require("./inventory_department_transactions"), exports);
|
|
49
|
+
__exportStar(require("./inventory_department_utilities"), exports);
|
|
50
|
+
__exportStar(require("./inventory_departments"), exports);
|
|
48
51
|
__exportStar(require("./inventory_transactions"), exports);
|
|
49
52
|
__exportStar(require("./item_transactions"), exports);
|
|
50
53
|
__exportStar(require("./items"), exports);
|
|
@@ -26,12 +26,15 @@ export declare const InventorySchema: Schema<any, import("mongoose").Model<any,
|
|
|
26
26
|
ingredients?: import("mongoose").Types.DocumentArray<{
|
|
27
27
|
inventory_code: string;
|
|
28
28
|
usage_quantity: number;
|
|
29
|
+
department_code?: string | null | undefined;
|
|
29
30
|
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
30
31
|
inventory_code: string;
|
|
31
32
|
usage_quantity: number;
|
|
33
|
+
department_code?: string | null | undefined;
|
|
32
34
|
}> & {
|
|
33
35
|
inventory_code: string;
|
|
34
36
|
usage_quantity: number;
|
|
37
|
+
department_code?: string | null | undefined;
|
|
35
38
|
}> | null | undefined;
|
|
36
39
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
37
40
|
createdAt: NativeDate;
|
|
@@ -55,12 +58,15 @@ export declare const InventorySchema: Schema<any, import("mongoose").Model<any,
|
|
|
55
58
|
ingredients?: import("mongoose").Types.DocumentArray<{
|
|
56
59
|
inventory_code: string;
|
|
57
60
|
usage_quantity: number;
|
|
61
|
+
department_code?: string | null | undefined;
|
|
58
62
|
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
59
63
|
inventory_code: string;
|
|
60
64
|
usage_quantity: number;
|
|
65
|
+
department_code?: string | null | undefined;
|
|
61
66
|
}> & {
|
|
62
67
|
inventory_code: string;
|
|
63
68
|
usage_quantity: number;
|
|
69
|
+
department_code?: string | null | undefined;
|
|
64
70
|
}> | null | undefined;
|
|
65
71
|
}>> & import("mongoose").FlatRecord<{
|
|
66
72
|
createdAt: NativeDate;
|
|
@@ -84,12 +90,15 @@ export declare const InventorySchema: Schema<any, import("mongoose").Model<any,
|
|
|
84
90
|
ingredients?: import("mongoose").Types.DocumentArray<{
|
|
85
91
|
inventory_code: string;
|
|
86
92
|
usage_quantity: number;
|
|
93
|
+
department_code?: string | null | undefined;
|
|
87
94
|
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
88
95
|
inventory_code: string;
|
|
89
96
|
usage_quantity: number;
|
|
97
|
+
department_code?: string | null | undefined;
|
|
90
98
|
}> & {
|
|
91
99
|
inventory_code: string;
|
|
92
100
|
usage_quantity: number;
|
|
101
|
+
department_code?: string | null | undefined;
|
|
93
102
|
}> | null | undefined;
|
|
94
103
|
}> & Required<{
|
|
95
104
|
_id: import("mongoose").Types.ObjectId;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
export declare const InventoryDepartmentTransactionsSchema: 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
|
+
tenant_id: string;
|
|
12
|
+
createdAt_mins: number;
|
|
13
|
+
createdAt: NativeDate;
|
|
14
|
+
updatedAt: NativeDate;
|
|
15
|
+
transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
|
|
16
|
+
transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
|
|
17
|
+
inventory_code: string;
|
|
18
|
+
department_code: string;
|
|
19
|
+
quantity_left: number;
|
|
20
|
+
unit_price: number;
|
|
21
|
+
remaining_stock_price: number;
|
|
22
|
+
previous_quantity_left: number;
|
|
23
|
+
previous_unit_price: number;
|
|
24
|
+
previous_remaining_stock_price: number;
|
|
25
|
+
transaction_quantity: number;
|
|
26
|
+
order_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
27
|
+
description?: string | null | undefined;
|
|
28
|
+
order_number?: number | null | undefined;
|
|
29
|
+
stock_price?: number | null | undefined;
|
|
30
|
+
stock_expiry_date?: NativeDate | null | undefined;
|
|
31
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
32
|
+
createdAt: NativeDate;
|
|
33
|
+
updatedAt: NativeDate;
|
|
34
|
+
} & {
|
|
35
|
+
_id: import("mongoose").Types.ObjectId;
|
|
36
|
+
tenant_id: string;
|
|
37
|
+
createdAt_mins: number;
|
|
38
|
+
createdAt: NativeDate;
|
|
39
|
+
updatedAt: NativeDate;
|
|
40
|
+
transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
|
|
41
|
+
transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
|
|
42
|
+
inventory_code: string;
|
|
43
|
+
department_code: string;
|
|
44
|
+
quantity_left: number;
|
|
45
|
+
unit_price: number;
|
|
46
|
+
remaining_stock_price: number;
|
|
47
|
+
previous_quantity_left: number;
|
|
48
|
+
previous_unit_price: number;
|
|
49
|
+
previous_remaining_stock_price: number;
|
|
50
|
+
transaction_quantity: number;
|
|
51
|
+
order_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
52
|
+
description?: string | null | undefined;
|
|
53
|
+
order_number?: number | null | undefined;
|
|
54
|
+
stock_price?: number | null | undefined;
|
|
55
|
+
stock_expiry_date?: NativeDate | null | undefined;
|
|
56
|
+
}>> & import("mongoose").FlatRecord<{
|
|
57
|
+
createdAt: NativeDate;
|
|
58
|
+
updatedAt: NativeDate;
|
|
59
|
+
} & {
|
|
60
|
+
_id: import("mongoose").Types.ObjectId;
|
|
61
|
+
tenant_id: string;
|
|
62
|
+
createdAt_mins: number;
|
|
63
|
+
createdAt: NativeDate;
|
|
64
|
+
updatedAt: NativeDate;
|
|
65
|
+
transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
|
|
66
|
+
transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
|
|
67
|
+
inventory_code: string;
|
|
68
|
+
department_code: string;
|
|
69
|
+
quantity_left: number;
|
|
70
|
+
unit_price: number;
|
|
71
|
+
remaining_stock_price: number;
|
|
72
|
+
previous_quantity_left: number;
|
|
73
|
+
previous_unit_price: number;
|
|
74
|
+
previous_remaining_stock_price: number;
|
|
75
|
+
transaction_quantity: number;
|
|
76
|
+
order_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
77
|
+
description?: string | null | undefined;
|
|
78
|
+
order_number?: number | null | undefined;
|
|
79
|
+
stock_price?: number | null | undefined;
|
|
80
|
+
stock_expiry_date?: NativeDate | null | undefined;
|
|
81
|
+
}> & Required<{
|
|
82
|
+
_id: import("mongoose").Types.ObjectId;
|
|
83
|
+
}> & {
|
|
84
|
+
__v: number;
|
|
85
|
+
}>;
|
|
86
|
+
export declare const INVENTORY_DEPARTMENT_TRANSACTIONS_COLLECTION_NAME = "inventory_department_transactions";
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.INVENTORY_DEPARTMENT_TRANSACTIONS_COLLECTION_NAME = exports.InventoryDepartmentTransactionsSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
exports.InventoryDepartmentTransactionsSchema = new mongoose_1.Schema({
|
|
7
|
+
_id: {
|
|
8
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
9
|
+
required: true,
|
|
10
|
+
immutable: true,
|
|
11
|
+
},
|
|
12
|
+
tenant_id: {
|
|
13
|
+
type: String,
|
|
14
|
+
required: true,
|
|
15
|
+
immutable: true,
|
|
16
|
+
ref: 'tenants',
|
|
17
|
+
},
|
|
18
|
+
department_code: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: true,
|
|
21
|
+
immutable: true,
|
|
22
|
+
ref: 'inventory_departments',
|
|
23
|
+
},
|
|
24
|
+
inventory_code: {
|
|
25
|
+
type: String,
|
|
26
|
+
required: true,
|
|
27
|
+
immutable: true,
|
|
28
|
+
ref: 'inventory_department_utilities',
|
|
29
|
+
},
|
|
30
|
+
transaction_quantity: {
|
|
31
|
+
type: Number,
|
|
32
|
+
required: true,
|
|
33
|
+
},
|
|
34
|
+
previous_quantity_left: {
|
|
35
|
+
type: Number,
|
|
36
|
+
required: true,
|
|
37
|
+
},
|
|
38
|
+
quantity_left: {
|
|
39
|
+
type: Number,
|
|
40
|
+
required: true,
|
|
41
|
+
},
|
|
42
|
+
previous_unit_price: {
|
|
43
|
+
type: Number,
|
|
44
|
+
required: true,
|
|
45
|
+
},
|
|
46
|
+
unit_price: {
|
|
47
|
+
type: Number,
|
|
48
|
+
required: true,
|
|
49
|
+
},
|
|
50
|
+
remaining_stock_price: {
|
|
51
|
+
type: Number,
|
|
52
|
+
default: 0,
|
|
53
|
+
},
|
|
54
|
+
previous_remaining_stock_price: {
|
|
55
|
+
type: Number,
|
|
56
|
+
default: 0,
|
|
57
|
+
},
|
|
58
|
+
transaction_type: {
|
|
59
|
+
type: String,
|
|
60
|
+
required: true,
|
|
61
|
+
enum: constants_1.ALL_INVENTORY_TRANSACTION_TYPES,
|
|
62
|
+
},
|
|
63
|
+
transaction_category: {
|
|
64
|
+
type: String,
|
|
65
|
+
required: true,
|
|
66
|
+
enum: constants_1.ALL_INVENTORY_TRANSACTION_CATEGORIES,
|
|
67
|
+
immutable: true,
|
|
68
|
+
},
|
|
69
|
+
stock_price: {
|
|
70
|
+
type: Number,
|
|
71
|
+
required: false,
|
|
72
|
+
},
|
|
73
|
+
stock_expiry_date: {
|
|
74
|
+
type: mongoose_1.Schema.Types.Date,
|
|
75
|
+
required: false,
|
|
76
|
+
},
|
|
77
|
+
order_id: {
|
|
78
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
79
|
+
required: false,
|
|
80
|
+
immutable: true,
|
|
81
|
+
},
|
|
82
|
+
order_number: {
|
|
83
|
+
type: Number,
|
|
84
|
+
required: false,
|
|
85
|
+
immutable: true,
|
|
86
|
+
},
|
|
87
|
+
description: {
|
|
88
|
+
type: String,
|
|
89
|
+
required: false,
|
|
90
|
+
},
|
|
91
|
+
createdAt_mins: {
|
|
92
|
+
type: Number,
|
|
93
|
+
required: true,
|
|
94
|
+
immutable: true,
|
|
95
|
+
default: () => {
|
|
96
|
+
const date = new Date();
|
|
97
|
+
return Math.floor(date.getHours() * 60 + date.getMinutes());
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
createdAt: {
|
|
101
|
+
type: mongoose_1.Schema.Types.Date,
|
|
102
|
+
required: true,
|
|
103
|
+
default: () => new Date(),
|
|
104
|
+
immutable: true,
|
|
105
|
+
},
|
|
106
|
+
updatedAt: {
|
|
107
|
+
type: mongoose_1.Schema.Types.Date,
|
|
108
|
+
required: true,
|
|
109
|
+
default: () => new Date(),
|
|
110
|
+
},
|
|
111
|
+
}, {
|
|
112
|
+
timestamps: true,
|
|
113
|
+
versionKey: false,
|
|
114
|
+
minimize: false,
|
|
115
|
+
});
|
|
116
|
+
exports.INVENTORY_DEPARTMENT_TRANSACTIONS_COLLECTION_NAME = 'inventory_department_transactions';
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
import { INVENTORY_ITEM_TYPE_ENUM } from '../../constants';
|
|
3
|
+
export declare const InventoryDepartmentUtilitySchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
4
|
+
timestamps: true;
|
|
5
|
+
versionKey: false;
|
|
6
|
+
minimize: false;
|
|
7
|
+
}, {
|
|
8
|
+
createdAt: NativeDate;
|
|
9
|
+
updatedAt: NativeDate;
|
|
10
|
+
} & {
|
|
11
|
+
code: string;
|
|
12
|
+
_id: import("mongoose").Types.ObjectId;
|
|
13
|
+
type: INVENTORY_ITEM_TYPE_ENUM;
|
|
14
|
+
name: string;
|
|
15
|
+
tenant_id: string;
|
|
16
|
+
createdAt: NativeDate;
|
|
17
|
+
updatedAt: NativeDate;
|
|
18
|
+
image_url: string;
|
|
19
|
+
active: boolean;
|
|
20
|
+
department_code: string;
|
|
21
|
+
unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
|
|
22
|
+
threshold_quantity: number;
|
|
23
|
+
quantity_left: number;
|
|
24
|
+
unit_price: number;
|
|
25
|
+
remaining_stock_price: number;
|
|
26
|
+
ingredients?: import("mongoose").Types.DocumentArray<{
|
|
27
|
+
inventory_code: string;
|
|
28
|
+
usage_quantity: number;
|
|
29
|
+
department_code?: string | null | undefined;
|
|
30
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
31
|
+
inventory_code: string;
|
|
32
|
+
usage_quantity: number;
|
|
33
|
+
department_code?: string | null | undefined;
|
|
34
|
+
}> & {
|
|
35
|
+
inventory_code: string;
|
|
36
|
+
usage_quantity: number;
|
|
37
|
+
department_code?: string | null | undefined;
|
|
38
|
+
}> | null | undefined;
|
|
39
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
40
|
+
createdAt: NativeDate;
|
|
41
|
+
updatedAt: NativeDate;
|
|
42
|
+
} & {
|
|
43
|
+
code: string;
|
|
44
|
+
_id: import("mongoose").Types.ObjectId;
|
|
45
|
+
type: INVENTORY_ITEM_TYPE_ENUM;
|
|
46
|
+
name: string;
|
|
47
|
+
tenant_id: string;
|
|
48
|
+
createdAt: NativeDate;
|
|
49
|
+
updatedAt: NativeDate;
|
|
50
|
+
image_url: string;
|
|
51
|
+
active: boolean;
|
|
52
|
+
department_code: string;
|
|
53
|
+
unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
|
|
54
|
+
threshold_quantity: number;
|
|
55
|
+
quantity_left: number;
|
|
56
|
+
unit_price: number;
|
|
57
|
+
remaining_stock_price: number;
|
|
58
|
+
ingredients?: import("mongoose").Types.DocumentArray<{
|
|
59
|
+
inventory_code: string;
|
|
60
|
+
usage_quantity: number;
|
|
61
|
+
department_code?: string | null | undefined;
|
|
62
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
63
|
+
inventory_code: string;
|
|
64
|
+
usage_quantity: number;
|
|
65
|
+
department_code?: string | null | undefined;
|
|
66
|
+
}> & {
|
|
67
|
+
inventory_code: string;
|
|
68
|
+
usage_quantity: number;
|
|
69
|
+
department_code?: string | null | undefined;
|
|
70
|
+
}> | null | undefined;
|
|
71
|
+
}>> & import("mongoose").FlatRecord<{
|
|
72
|
+
createdAt: NativeDate;
|
|
73
|
+
updatedAt: NativeDate;
|
|
74
|
+
} & {
|
|
75
|
+
code: string;
|
|
76
|
+
_id: import("mongoose").Types.ObjectId;
|
|
77
|
+
type: INVENTORY_ITEM_TYPE_ENUM;
|
|
78
|
+
name: string;
|
|
79
|
+
tenant_id: string;
|
|
80
|
+
createdAt: NativeDate;
|
|
81
|
+
updatedAt: NativeDate;
|
|
82
|
+
image_url: string;
|
|
83
|
+
active: boolean;
|
|
84
|
+
department_code: string;
|
|
85
|
+
unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
|
|
86
|
+
threshold_quantity: number;
|
|
87
|
+
quantity_left: number;
|
|
88
|
+
unit_price: number;
|
|
89
|
+
remaining_stock_price: number;
|
|
90
|
+
ingredients?: import("mongoose").Types.DocumentArray<{
|
|
91
|
+
inventory_code: string;
|
|
92
|
+
usage_quantity: number;
|
|
93
|
+
department_code?: string | null | undefined;
|
|
94
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
95
|
+
inventory_code: string;
|
|
96
|
+
usage_quantity: number;
|
|
97
|
+
department_code?: string | null | undefined;
|
|
98
|
+
}> & {
|
|
99
|
+
inventory_code: string;
|
|
100
|
+
usage_quantity: number;
|
|
101
|
+
department_code?: string | null | undefined;
|
|
102
|
+
}> | null | undefined;
|
|
103
|
+
}> & Required<{
|
|
104
|
+
_id: import("mongoose").Types.ObjectId;
|
|
105
|
+
}> & {
|
|
106
|
+
__v: number;
|
|
107
|
+
}>;
|
|
108
|
+
export declare const INVENTORY_DEPARTMENT_UTILITIES_COLLECTION_NAME = "inventory_department_utilities";
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.INVENTORY_DEPARTMENT_UTILITIES_COLLECTION_NAME = exports.InventoryDepartmentUtilitySchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
const items_1 = require("./items");
|
|
7
|
+
exports.InventoryDepartmentUtilitySchema = new mongoose_1.Schema({
|
|
8
|
+
_id: {
|
|
9
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
10
|
+
required: true,
|
|
11
|
+
immutable: true,
|
|
12
|
+
},
|
|
13
|
+
code: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true,
|
|
16
|
+
immutable: true,
|
|
17
|
+
},
|
|
18
|
+
tenant_id: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: true,
|
|
21
|
+
immutable: true,
|
|
22
|
+
ref: 'tenants',
|
|
23
|
+
},
|
|
24
|
+
department_code: {
|
|
25
|
+
type: String,
|
|
26
|
+
required: true,
|
|
27
|
+
immutable: true,
|
|
28
|
+
ref: 'inventory_departments',
|
|
29
|
+
},
|
|
30
|
+
name: {
|
|
31
|
+
type: String,
|
|
32
|
+
required: true,
|
|
33
|
+
},
|
|
34
|
+
unit: {
|
|
35
|
+
type: String,
|
|
36
|
+
enum: constants_1.ALL_INVENTORY_UNIT_TYPES,
|
|
37
|
+
required: true,
|
|
38
|
+
},
|
|
39
|
+
threshold_quantity: {
|
|
40
|
+
type: Number,
|
|
41
|
+
default: 0,
|
|
42
|
+
},
|
|
43
|
+
quantity_left: {
|
|
44
|
+
type: Number,
|
|
45
|
+
default: 0,
|
|
46
|
+
},
|
|
47
|
+
unit_price: {
|
|
48
|
+
type: Number,
|
|
49
|
+
default: 0,
|
|
50
|
+
},
|
|
51
|
+
remaining_stock_price: {
|
|
52
|
+
type: Number,
|
|
53
|
+
default: 0,
|
|
54
|
+
},
|
|
55
|
+
type: {
|
|
56
|
+
type: String,
|
|
57
|
+
enum: constants_1.ALL_INVENTORY_ITEM_TYPES,
|
|
58
|
+
default: constants_1.INVENTORY_ITEM_TYPE_ENUM.BASE_ITEM,
|
|
59
|
+
},
|
|
60
|
+
ingredients: {
|
|
61
|
+
type: [items_1.IngredientSchema],
|
|
62
|
+
required: false,
|
|
63
|
+
},
|
|
64
|
+
image_url: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: null,
|
|
67
|
+
},
|
|
68
|
+
active: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
required: true,
|
|
71
|
+
},
|
|
72
|
+
createdAt: {
|
|
73
|
+
type: mongoose_1.Schema.Types.Date,
|
|
74
|
+
required: true,
|
|
75
|
+
default: () => new Date(),
|
|
76
|
+
immutable: true,
|
|
77
|
+
},
|
|
78
|
+
updatedAt: {
|
|
79
|
+
type: mongoose_1.Schema.Types.Date,
|
|
80
|
+
required: true,
|
|
81
|
+
default: () => new Date(),
|
|
82
|
+
},
|
|
83
|
+
}, {
|
|
84
|
+
timestamps: true,
|
|
85
|
+
versionKey: false,
|
|
86
|
+
minimize: false,
|
|
87
|
+
});
|
|
88
|
+
exports.INVENTORY_DEPARTMENT_UTILITIES_COLLECTION_NAME = 'inventory_department_utilities';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
export declare const InventoryDepartmentSchema: 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
|
+
name: string;
|
|
12
|
+
tenant_id: string;
|
|
13
|
+
createdAt: NativeDate;
|
|
14
|
+
updatedAt: NativeDate;
|
|
15
|
+
image_url: string;
|
|
16
|
+
subtitle: string;
|
|
17
|
+
active: boolean;
|
|
18
|
+
sort_id: number;
|
|
19
|
+
department_code: string;
|
|
20
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
21
|
+
createdAt: NativeDate;
|
|
22
|
+
updatedAt: NativeDate;
|
|
23
|
+
} & {
|
|
24
|
+
_id: import("mongoose").Types.ObjectId;
|
|
25
|
+
name: string;
|
|
26
|
+
tenant_id: string;
|
|
27
|
+
createdAt: NativeDate;
|
|
28
|
+
updatedAt: NativeDate;
|
|
29
|
+
image_url: string;
|
|
30
|
+
subtitle: string;
|
|
31
|
+
active: boolean;
|
|
32
|
+
sort_id: number;
|
|
33
|
+
department_code: string;
|
|
34
|
+
}>> & import("mongoose").FlatRecord<{
|
|
35
|
+
createdAt: NativeDate;
|
|
36
|
+
updatedAt: NativeDate;
|
|
37
|
+
} & {
|
|
38
|
+
_id: import("mongoose").Types.ObjectId;
|
|
39
|
+
name: string;
|
|
40
|
+
tenant_id: string;
|
|
41
|
+
createdAt: NativeDate;
|
|
42
|
+
updatedAt: NativeDate;
|
|
43
|
+
image_url: string;
|
|
44
|
+
subtitle: string;
|
|
45
|
+
active: boolean;
|
|
46
|
+
sort_id: number;
|
|
47
|
+
department_code: string;
|
|
48
|
+
}> & Required<{
|
|
49
|
+
_id: import("mongoose").Types.ObjectId;
|
|
50
|
+
}> & {
|
|
51
|
+
__v: number;
|
|
52
|
+
}>;
|
|
53
|
+
export declare const INVENTORY_DEPARTMENTS_COLLECTION_NAME = "inventory_departments";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.INVENTORY_DEPARTMENTS_COLLECTION_NAME = exports.InventoryDepartmentSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
exports.InventoryDepartmentSchema = new mongoose_1.Schema({
|
|
6
|
+
_id: {
|
|
7
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
8
|
+
required: true,
|
|
9
|
+
immutable: true,
|
|
10
|
+
},
|
|
11
|
+
tenant_id: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: true,
|
|
14
|
+
immutable: true,
|
|
15
|
+
ref: 'tenants',
|
|
16
|
+
},
|
|
17
|
+
department_code: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true,
|
|
20
|
+
immutable: true,
|
|
21
|
+
},
|
|
22
|
+
name: {
|
|
23
|
+
type: String,
|
|
24
|
+
required: true,
|
|
25
|
+
},
|
|
26
|
+
subtitle: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: '',
|
|
29
|
+
},
|
|
30
|
+
active: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
required: true,
|
|
33
|
+
},
|
|
34
|
+
sort_id: {
|
|
35
|
+
type: Number,
|
|
36
|
+
required: true,
|
|
37
|
+
},
|
|
38
|
+
image_url: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: null,
|
|
41
|
+
},
|
|
42
|
+
createdAt: {
|
|
43
|
+
type: mongoose_1.Schema.Types.Date,
|
|
44
|
+
required: true,
|
|
45
|
+
default: () => new Date(),
|
|
46
|
+
immutable: true,
|
|
47
|
+
},
|
|
48
|
+
updatedAt: {
|
|
49
|
+
type: mongoose_1.Schema.Types.Date,
|
|
50
|
+
required: true,
|
|
51
|
+
default: () => new Date(),
|
|
52
|
+
},
|
|
53
|
+
}, {
|
|
54
|
+
timestamps: true,
|
|
55
|
+
versionKey: false,
|
|
56
|
+
minimize: false,
|
|
57
|
+
});
|
|
58
|
+
exports.INVENTORY_DEPARTMENTS_COLLECTION_NAME = 'inventory_departments';
|
|
@@ -24,6 +24,7 @@ export declare const InventoryTransactionsSchema: Schema<any, import("mongoose")
|
|
|
24
24
|
transaction_quantity: number;
|
|
25
25
|
order_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
26
26
|
description?: string | null | undefined;
|
|
27
|
+
department_code?: string | null | undefined;
|
|
27
28
|
order_number?: number | null | undefined;
|
|
28
29
|
stock_price?: number | null | undefined;
|
|
29
30
|
stock_expiry_date?: NativeDate | null | undefined;
|
|
@@ -48,6 +49,7 @@ export declare const InventoryTransactionsSchema: Schema<any, import("mongoose")
|
|
|
48
49
|
transaction_quantity: number;
|
|
49
50
|
order_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
50
51
|
description?: string | null | undefined;
|
|
52
|
+
department_code?: string | null | undefined;
|
|
51
53
|
order_number?: number | null | undefined;
|
|
52
54
|
stock_price?: number | null | undefined;
|
|
53
55
|
stock_expiry_date?: NativeDate | null | undefined;
|
|
@@ -72,6 +74,7 @@ export declare const InventoryTransactionsSchema: Schema<any, import("mongoose")
|
|
|
72
74
|
transaction_quantity: number;
|
|
73
75
|
order_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
74
76
|
description?: string | null | undefined;
|
|
77
|
+
department_code?: string | null | undefined;
|
|
75
78
|
order_number?: number | null | undefined;
|
|
76
79
|
stock_price?: number | null | undefined;
|
|
77
80
|
stock_expiry_date?: NativeDate | null | undefined;
|