tt-entities 0.0.19 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/libs/tatayab-entities-library/entities/apikey.entity.d.ts +15 -0
- package/dist/libs/tatayab-entities-library/entities/apikey.entity.js +62 -0
- package/dist/libs/tatayab-entities-library/entities/apikey.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/area.entity.d.ts +7 -0
- package/dist/libs/tatayab-entities-library/entities/area.entity.js +37 -0
- package/dist/libs/tatayab-entities-library/entities/area.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/brand.entity.d.ts +12 -0
- package/dist/libs/tatayab-entities-library/entities/brand.entity.js +56 -0
- package/dist/libs/tatayab-entities-library/entities/brand.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/category.entity.d.ts +14 -0
- package/dist/libs/tatayab-entities-library/entities/category.entity.js +65 -0
- package/dist/libs/tatayab-entities-library/entities/category.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/country.entity.d.ts +8 -0
- package/dist/libs/tatayab-entities-library/entities/country.entity.js +40 -0
- package/dist/libs/tatayab-entities-library/entities/country.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/inventory-stock.entity.d.ts +16 -0
- package/dist/libs/tatayab-entities-library/entities/inventory-stock.entity.js +66 -0
- package/dist/libs/tatayab-entities-library/entities/inventory-stock.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/inventory.entity.d.ts +15 -0
- package/dist/libs/tatayab-entities-library/entities/inventory.entity.js +63 -0
- package/dist/libs/tatayab-entities-library/entities/inventory.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/permission.entity.d.ts +8 -0
- package/dist/libs/tatayab-entities-library/entities/permission.entity.js +38 -0
- package/dist/libs/tatayab-entities-library/entities/permission.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/product-media.entity.d.ts +16 -0
- package/dist/libs/tatayab-entities-library/entities/product-media.entity.js +62 -0
- package/dist/libs/tatayab-entities-library/entities/product-media.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/product-store.entity.d.ts +11 -0
- package/dist/libs/tatayab-entities-library/entities/product-store.entity.js +56 -0
- package/dist/libs/tatayab-entities-library/entities/product-store.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/product-tag.entity.d.ts +5 -0
- package/dist/libs/tatayab-entities-library/entities/product-tag.entity.js +32 -0
- package/dist/libs/tatayab-entities-library/entities/product-tag.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/product-variant-option.entity.d.ts +5 -0
- package/dist/libs/tatayab-entities-library/entities/product-variant-option.entity.js +32 -0
- package/dist/libs/tatayab-entities-library/entities/product-variant-option.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/product-variant.entity.d.ts +15 -0
- package/dist/libs/tatayab-entities-library/entities/product-variant.entity.js +64 -0
- package/dist/libs/tatayab-entities-library/entities/product-variant.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/product.entity.d.ts +29 -0
- package/dist/libs/tatayab-entities-library/entities/product.entity.js +110 -0
- package/dist/libs/tatayab-entities-library/entities/product.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/purchase-order-item.entity.d.ts +25 -0
- package/dist/libs/tatayab-entities-library/entities/purchase-order-item.entity.js +88 -0
- package/dist/libs/tatayab-entities-library/entities/purchase-order-item.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/purchase-order.entity.d.ts +27 -0
- package/dist/libs/tatayab-entities-library/entities/purchase-order.entity.js +108 -0
- package/dist/libs/tatayab-entities-library/entities/purchase-order.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/role-permission.entity.d.ts +5 -0
- package/dist/libs/tatayab-entities-library/entities/role-permission.entity.js +32 -0
- package/dist/libs/tatayab-entities-library/entities/role-permission.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/stock-movement.entity.d.ts +23 -0
- package/dist/libs/tatayab-entities-library/entities/stock-movement.entity.js +92 -0
- package/dist/libs/tatayab-entities-library/entities/stock-movement.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/store-inventory.entity.d.ts +6 -0
- package/dist/libs/tatayab-entities-library/entities/store-inventory.entity.js +36 -0
- package/dist/libs/tatayab-entities-library/entities/store-inventory.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/store.entity.d.ts +21 -0
- package/dist/libs/tatayab-entities-library/entities/store.entity.js +86 -0
- package/dist/libs/tatayab-entities-library/entities/store.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/sys.role.entity.d.ts +7 -0
- package/dist/libs/tatayab-entities-library/entities/sys.role.entity.js +34 -0
- package/dist/libs/tatayab-entities-library/entities/sys.role.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/sys.user.entity.d.ts +16 -0
- package/dist/libs/tatayab-entities-library/entities/sys.user.entity.js +70 -0
- package/dist/libs/tatayab-entities-library/entities/sys.user.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/tag.entity.d.ts +12 -0
- package/dist/libs/tatayab-entities-library/entities/tag.entity.js +54 -0
- package/dist/libs/tatayab-entities-library/entities/tag.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/user.entity.d.ts +27 -0
- package/dist/libs/tatayab-entities-library/entities/user.entity.js +114 -0
- package/dist/libs/tatayab-entities-library/entities/user.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/userDevice.entity.d.ts +11 -0
- package/dist/libs/tatayab-entities-library/entities/userDevice.entity.js +54 -0
- package/dist/libs/tatayab-entities-library/entities/userDevice.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/variant-option.entity.d.ts +11 -0
- package/dist/libs/tatayab-entities-library/entities/variant-option.entity.js +50 -0
- package/dist/libs/tatayab-entities-library/entities/variant-option.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/variant-type.entity.d.ts +7 -0
- package/dist/libs/tatayab-entities-library/entities/variant-type.entity.js +37 -0
- package/dist/libs/tatayab-entities-library/entities/variant-type.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/vendor-product.entity.d.ts +19 -0
- package/dist/libs/tatayab-entities-library/entities/vendor-product.entity.js +78 -0
- package/dist/libs/tatayab-entities-library/entities/vendor-product.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/vendor.entity.d.ts +19 -0
- package/dist/libs/tatayab-entities-library/entities/vendor.entity.js +82 -0
- package/dist/libs/tatayab-entities-library/entities/vendor.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/index.d.ts +39 -0
- package/dist/libs/tatayab-entities-library/index.js +143 -0
- package/dist/libs/tatayab-entities-library/index.js.map +1 -0
- package/dist/libs/tatayab-entities-library/utils/enums/gender.d.ts +5 -0
- package/dist/libs/tatayab-entities-library/utils/enums/gender.js +10 -0
- package/dist/libs/tatayab-entities-library/utils/enums/gender.js.map +1 -0
- package/dist/libs/tatayab-entities-library/utils/enums/language.d.ts +4 -0
- package/dist/libs/tatayab-entities-library/utils/enums/language.js +9 -0
- package/dist/libs/tatayab-entities-library/utils/enums/language.js.map +1 -0
- package/dist/libs/tatayab-entities-library/utils/enums/osName.d.ts +5 -0
- package/dist/libs/tatayab-entities-library/utils/enums/osName.js +10 -0
- package/dist/libs/tatayab-entities-library/utils/enums/osName.js.map +1 -0
- package/dist/libs/tatayab-entities-library/utils/enums/productApp.d.ts +4 -0
- package/dist/libs/tatayab-entities-library/utils/enums/productApp.js +9 -0
- package/dist/libs/tatayab-entities-library/utils/enums/productApp.js.map +1 -0
- package/dist/libs/tatayab-entities-library/utils/enums/purchaseOrderStatus.d.ts +8 -0
- package/dist/libs/tatayab-entities-library/utils/enums/purchaseOrderStatus.js +13 -0
- package/dist/libs/tatayab-entities-library/utils/enums/purchaseOrderStatus.js.map +1 -0
- package/dist/libs/tatayab-entities-library/utils/enums/status.d.ts +4 -0
- package/dist/libs/tatayab-entities-library/utils/enums/status.js +9 -0
- package/dist/libs/tatayab-entities-library/utils/enums/status.js.map +1 -0
- package/dist/libs/tatayab-entities-library/utils/enums/stockMovementType.d.ts +11 -0
- package/dist/libs/tatayab-entities-library/utils/enums/stockMovementType.js +16 -0
- package/dist/libs/tatayab-entities-library/utils/enums/stockMovementType.js.map +1 -0
- package/dist/libs/tatayab-entities-library/utils/enums/versiontype.d.ts +4 -0
- package/dist/libs/tatayab-entities-library/utils/enums/versiontype.js +9 -0
- package/dist/libs/tatayab-entities-library/utils/enums/versiontype.js.map +1 -0
- package/package.json +5 -5
- package/dist/src/main.js +0 -2372
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PurchaseOrder = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const vendor_entity_1 = require("./vendor.entity");
|
|
15
|
+
const inventory_entity_1 = require("./inventory.entity");
|
|
16
|
+
const sys_user_entity_1 = require("./sys.user.entity");
|
|
17
|
+
const purchase_order_item_entity_1 = require("./purchase-order-item.entity");
|
|
18
|
+
const purchaseOrderStatus_1 = require("../utils/enums/purchaseOrderStatus");
|
|
19
|
+
let PurchaseOrder = class PurchaseOrder extends sequelize_typescript_1.Model {
|
|
20
|
+
};
|
|
21
|
+
exports.PurchaseOrder = PurchaseOrder;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, unique: true }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], PurchaseOrder.prototype, "poNumber", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, sequelize_typescript_1.ForeignKey)(() => vendor_entity_1.Vendor),
|
|
28
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], PurchaseOrder.prototype, "vendorId", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, sequelize_typescript_1.ForeignKey)(() => inventory_entity_1.Inventory),
|
|
33
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
34
|
+
__metadata("design:type", Number)
|
|
35
|
+
], PurchaseOrder.prototype, "inventoryId", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, sequelize_typescript_1.Column)({
|
|
38
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(purchaseOrderStatus_1.PurchaseOrderStatus)),
|
|
39
|
+
defaultValue: purchaseOrderStatus_1.PurchaseOrderStatus.DRAFT,
|
|
40
|
+
}),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], PurchaseOrder.prototype, "status", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), defaultValue: 0 }),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], PurchaseOrder.prototype, "totalAmount", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, defaultValue: 'USD' }),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], PurchaseOrder.prototype, "currency", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
53
|
+
__metadata("design:type", Date)
|
|
54
|
+
], PurchaseOrder.prototype, "expectedDeliveryDate", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
57
|
+
__metadata("design:type", Date)
|
|
58
|
+
], PurchaseOrder.prototype, "sentAt", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
61
|
+
__metadata("design:type", Date)
|
|
62
|
+
], PurchaseOrder.prototype, "closedAt", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
65
|
+
__metadata("design:type", Date)
|
|
66
|
+
], PurchaseOrder.prototype, "cancelledAt", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], PurchaseOrder.prototype, "cancellationReason", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], PurchaseOrder.prototype, "notes", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, sequelize_typescript_1.ForeignKey)(() => sys_user_entity_1.SysUser),
|
|
77
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
78
|
+
__metadata("design:type", Number)
|
|
79
|
+
], PurchaseOrder.prototype, "createdBy", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, sequelize_typescript_1.ForeignKey)(() => sys_user_entity_1.SysUser),
|
|
82
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
83
|
+
__metadata("design:type", Number)
|
|
84
|
+
], PurchaseOrder.prototype, "sentBy", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, sequelize_typescript_1.BelongsTo)(() => vendor_entity_1.Vendor),
|
|
87
|
+
__metadata("design:type", vendor_entity_1.Vendor)
|
|
88
|
+
], PurchaseOrder.prototype, "vendor", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, sequelize_typescript_1.BelongsTo)(() => inventory_entity_1.Inventory),
|
|
91
|
+
__metadata("design:type", inventory_entity_1.Inventory)
|
|
92
|
+
], PurchaseOrder.prototype, "inventory", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, sequelize_typescript_1.BelongsTo)(() => sys_user_entity_1.SysUser, { foreignKey: 'createdBy', as: 'creator' }),
|
|
95
|
+
__metadata("design:type", sys_user_entity_1.SysUser)
|
|
96
|
+
], PurchaseOrder.prototype, "creator", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, sequelize_typescript_1.BelongsTo)(() => sys_user_entity_1.SysUser, { foreignKey: 'sentBy', as: 'sender' }),
|
|
99
|
+
__metadata("design:type", sys_user_entity_1.SysUser)
|
|
100
|
+
], PurchaseOrder.prototype, "sender", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, sequelize_typescript_1.HasMany)(() => purchase_order_item_entity_1.PurchaseOrderItem),
|
|
103
|
+
__metadata("design:type", Array)
|
|
104
|
+
], PurchaseOrder.prototype, "items", void 0);
|
|
105
|
+
exports.PurchaseOrder = PurchaseOrder = __decorate([
|
|
106
|
+
sequelize_typescript_1.Table
|
|
107
|
+
], PurchaseOrder);
|
|
108
|
+
//# sourceMappingURL=purchase-order.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"purchase-order.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/purchase-order.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAQ8B;AAC9B,m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
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.RolePermission = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const sys_role_entity_1 = require("./sys.role.entity");
|
|
15
|
+
const permission_entity_1 = require("./permission.entity");
|
|
16
|
+
let RolePermission = class RolePermission extends sequelize_typescript_1.Model {
|
|
17
|
+
};
|
|
18
|
+
exports.RolePermission = RolePermission;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, sequelize_typescript_1.ForeignKey)(() => sys_role_entity_1.SysRole),
|
|
21
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
22
|
+
__metadata("design:type", Number)
|
|
23
|
+
], RolePermission.prototype, "sysRoleId", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, sequelize_typescript_1.ForeignKey)(() => permission_entity_1.Permission),
|
|
26
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], RolePermission.prototype, "permissionId", void 0);
|
|
29
|
+
exports.RolePermission = RolePermission = __decorate([
|
|
30
|
+
sequelize_typescript_1.Table
|
|
31
|
+
], RolePermission);
|
|
32
|
+
//# sourceMappingURL=role-permission.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"role-permission.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/role-permission.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAK8B;AAC9B,uDAA4C;AAC5C,2DAAiD;AAG1C,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,4BAAK;CAQxC,CAAA;AARY,wCAAc;AAGjB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,yBAAO,CAAC;IACzB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;iDACH;AAIlB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,8BAAU,CAAC;IAC5B,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;oDACA;yBAPlB,cAAc;IAD1B,4BAAK;GACO,cAAc,CAQ1B"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { Inventory } from './inventory.entity';
|
|
3
|
+
import { Product } from './product.entity';
|
|
4
|
+
import { ProductVariant } from './product-variant.entity';
|
|
5
|
+
import { SysUser } from './sys.user.entity';
|
|
6
|
+
import { StockMovementType } from '../utils/enums/stockMovementType';
|
|
7
|
+
export declare class StockMovement extends Model {
|
|
8
|
+
inventoryId: number;
|
|
9
|
+
productId: number;
|
|
10
|
+
productVariantId?: number;
|
|
11
|
+
movementType: StockMovementType;
|
|
12
|
+
quantity: number;
|
|
13
|
+
quantityBefore: number;
|
|
14
|
+
quantityAfter: number;
|
|
15
|
+
referenceType?: string;
|
|
16
|
+
referenceId?: number;
|
|
17
|
+
notes?: string;
|
|
18
|
+
createdBy?: number;
|
|
19
|
+
inventory: Inventory;
|
|
20
|
+
product: Product;
|
|
21
|
+
variant?: ProductVariant;
|
|
22
|
+
createdByUser?: SysUser;
|
|
23
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.StockMovement = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const inventory_entity_1 = require("./inventory.entity");
|
|
15
|
+
const product_entity_1 = require("./product.entity");
|
|
16
|
+
const product_variant_entity_1 = require("./product-variant.entity");
|
|
17
|
+
const sys_user_entity_1 = require("./sys.user.entity");
|
|
18
|
+
const stockMovementType_1 = require("../utils/enums/stockMovementType");
|
|
19
|
+
let StockMovement = class StockMovement extends sequelize_typescript_1.Model {
|
|
20
|
+
};
|
|
21
|
+
exports.StockMovement = StockMovement;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, sequelize_typescript_1.ForeignKey)(() => inventory_entity_1.Inventory),
|
|
24
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], StockMovement.prototype, "inventoryId", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, sequelize_typescript_1.ForeignKey)(() => product_entity_1.Product),
|
|
29
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
30
|
+
__metadata("design:type", Number)
|
|
31
|
+
], StockMovement.prototype, "productId", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, sequelize_typescript_1.ForeignKey)(() => product_variant_entity_1.ProductVariant),
|
|
34
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], StockMovement.prototype, "productVariantId", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, sequelize_typescript_1.Column)({
|
|
39
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(stockMovementType_1.StockMovementType)),
|
|
40
|
+
allowNull: false,
|
|
41
|
+
}),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], StockMovement.prototype, "movementType", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
46
|
+
__metadata("design:type", Number)
|
|
47
|
+
], StockMovement.prototype, "quantity", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
50
|
+
__metadata("design:type", Number)
|
|
51
|
+
], StockMovement.prototype, "quantityBefore", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
54
|
+
__metadata("design:type", Number)
|
|
55
|
+
], StockMovement.prototype, "quantityAfter", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], StockMovement.prototype, "referenceType", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
62
|
+
__metadata("design:type", Number)
|
|
63
|
+
], StockMovement.prototype, "referenceId", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
66
|
+
__metadata("design:type", String)
|
|
67
|
+
], StockMovement.prototype, "notes", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, sequelize_typescript_1.ForeignKey)(() => sys_user_entity_1.SysUser),
|
|
70
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
71
|
+
__metadata("design:type", Number)
|
|
72
|
+
], StockMovement.prototype, "createdBy", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, sequelize_typescript_1.BelongsTo)(() => inventory_entity_1.Inventory),
|
|
75
|
+
__metadata("design:type", inventory_entity_1.Inventory)
|
|
76
|
+
], StockMovement.prototype, "inventory", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, sequelize_typescript_1.BelongsTo)(() => product_entity_1.Product),
|
|
79
|
+
__metadata("design:type", product_entity_1.Product)
|
|
80
|
+
], StockMovement.prototype, "product", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, sequelize_typescript_1.BelongsTo)(() => product_variant_entity_1.ProductVariant),
|
|
83
|
+
__metadata("design:type", product_variant_entity_1.ProductVariant)
|
|
84
|
+
], StockMovement.prototype, "variant", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, sequelize_typescript_1.BelongsTo)(() => sys_user_entity_1.SysUser),
|
|
87
|
+
__metadata("design:type", sys_user_entity_1.SysUser)
|
|
88
|
+
], StockMovement.prototype, "createdByUser", void 0);
|
|
89
|
+
exports.StockMovement = StockMovement = __decorate([
|
|
90
|
+
sequelize_typescript_1.Table
|
|
91
|
+
], StockMovement);
|
|
92
|
+
//# sourceMappingURL=stock-movement.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stock-movement.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/stock-movement.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAO8B;AAC9B,yDAA+C;AAC/C,qDAA2C;AAC3C,qEAA0D;AAC1D,uDAA4C;AAC5C,wEAAqE;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,SAAS,EAAE,IAAI,EAAE,CAAC;;gDACD;AAKnB;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,4BAAS,CAAC;8BACR,4BAAS;gDAAC;AAGrB;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;8BACR,wBAAO;8CAAC;AAGjB;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,uCAAc,CAAC;8BACd,uCAAc;8CAAC;AAGzB;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,yBAAO,CAAC;8BACD,yBAAO;oDAAC;wBAzDrB,aAAa;IADzB,4BAAK;GACO,aAAa,CA0DzB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.StoreInventory = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const store_entity_1 = require("./store.entity");
|
|
15
|
+
const inventory_entity_1 = require("./inventory.entity");
|
|
16
|
+
let StoreInventory = class StoreInventory extends sequelize_typescript_1.Model {
|
|
17
|
+
};
|
|
18
|
+
exports.StoreInventory = StoreInventory;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, sequelize_typescript_1.ForeignKey)(() => store_entity_1.Store),
|
|
21
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
22
|
+
__metadata("design:type", Number)
|
|
23
|
+
], StoreInventory.prototype, "storeId", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, sequelize_typescript_1.ForeignKey)(() => inventory_entity_1.Inventory),
|
|
26
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], StoreInventory.prototype, "inventoryId", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: 1 }),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], StoreInventory.prototype, "priority", void 0);
|
|
33
|
+
exports.StoreInventory = StoreInventory = __decorate([
|
|
34
|
+
sequelize_typescript_1.Table
|
|
35
|
+
], StoreInventory);
|
|
36
|
+
//# sourceMappingURL=store-inventory.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-inventory.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/store-inventory.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAM8B;AAC9B,iDAAuC;AACvC,yDAA+C;AAGxC,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,4BAAK;CAYxC,CAAA;AAZY,wCAAc;AAGjB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,oBAAK,CAAC;IACvB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;+CACL;AAIhB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,4BAAS,CAAC;IAC3B,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;mDACD;AAIpB;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;gDACH;yBAXd,cAAc;IAD1B,4BAAK;GACO,cAAc,CAY1B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { Country } from './country.entity';
|
|
3
|
+
import { Product } from './product.entity';
|
|
4
|
+
import { Inventory } from './inventory.entity';
|
|
5
|
+
import { Status } from '../utils/enums/status';
|
|
6
|
+
export declare class Store extends Model {
|
|
7
|
+
nameEn: string;
|
|
8
|
+
nameAr: string;
|
|
9
|
+
descriptionEn?: string;
|
|
10
|
+
descriptionAr?: string;
|
|
11
|
+
logo?: string;
|
|
12
|
+
currency: string;
|
|
13
|
+
currencySymbolEn?: string;
|
|
14
|
+
currencySymbolAr?: string;
|
|
15
|
+
countryId?: number;
|
|
16
|
+
isGlobal: boolean;
|
|
17
|
+
status: Status;
|
|
18
|
+
country: Country;
|
|
19
|
+
products: Product[];
|
|
20
|
+
inventories: Inventory[];
|
|
21
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Store = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const country_entity_1 = require("./country.entity");
|
|
15
|
+
const product_store_entity_1 = require("./product-store.entity");
|
|
16
|
+
const product_entity_1 = require("./product.entity");
|
|
17
|
+
const store_inventory_entity_1 = require("./store-inventory.entity");
|
|
18
|
+
const inventory_entity_1 = require("./inventory.entity");
|
|
19
|
+
const status_1 = require("../utils/enums/status");
|
|
20
|
+
let Store = class Store extends sequelize_typescript_1.Model {
|
|
21
|
+
};
|
|
22
|
+
exports.Store = Store;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], Store.prototype, "nameEn", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], Store.prototype, "nameAr", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], Store.prototype, "descriptionEn", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], Store.prototype, "descriptionAr", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], Store.prototype, "logo", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, defaultValue: 'USD' }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], Store.prototype, "currency", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], Store.prototype, "currencySymbolEn", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], Store.prototype, "currencySymbolAr", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, sequelize_typescript_1.ForeignKey)(() => country_entity_1.Country),
|
|
57
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
58
|
+
__metadata("design:type", Number)
|
|
59
|
+
], Store.prototype, "countryId", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: false }),
|
|
62
|
+
__metadata("design:type", Boolean)
|
|
63
|
+
], Store.prototype, "isGlobal", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, sequelize_typescript_1.Column)({
|
|
66
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
|
|
67
|
+
defaultValue: status_1.Status.ACTIVE,
|
|
68
|
+
}),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], Store.prototype, "status", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, sequelize_typescript_1.BelongsTo)(() => country_entity_1.Country),
|
|
73
|
+
__metadata("design:type", country_entity_1.Country)
|
|
74
|
+
], Store.prototype, "country", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, sequelize_typescript_1.BelongsToMany)(() => product_entity_1.Product, () => product_store_entity_1.ProductStore),
|
|
77
|
+
__metadata("design:type", Array)
|
|
78
|
+
], Store.prototype, "products", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, sequelize_typescript_1.BelongsToMany)(() => inventory_entity_1.Inventory, () => store_inventory_entity_1.StoreInventory),
|
|
81
|
+
__metadata("design:type", Array)
|
|
82
|
+
], Store.prototype, "inventories", void 0);
|
|
83
|
+
exports.Store = Store = __decorate([
|
|
84
|
+
sequelize_typescript_1.Table
|
|
85
|
+
], Store);
|
|
86
|
+
//# sourceMappingURL=store.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/store.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAS8B;AAC9B,qDAA2C;AAC3C,iEAAsD;AACtD,qDAA2C;AAC3C,qEAA0D;AAC1D,yDAA+C;AAC/C,kDAA+C;AAGxC,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,4BAAK;CAiD/B,CAAA;AAjDY,sBAAK;AAER;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;qCACN;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;qCACN;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;4CAClB;AAGvB;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;4CAClB;AAGvB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;mCACN;AAId;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;;uCACzB;AAGjB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;+CACM;AAG1B;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;+CACM;AAI1B;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;IACzB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;wCACD;AAGnB;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;;uCACN;AAMlB;IAJP,IAAA,6BAAM,EAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,eAAM,CAAC,CAAC;QAC7C,YAAY,EAAE,eAAM,CAAC,MAAM;KAC5B,CAAC;;qCACqB;AAKf;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;8BACR,wBAAO;sCAAC;AAGjB;IADP,IAAA,oCAAa,EAAC,GAAG,EAAE,CAAC,wBAAO,EAAE,GAAG,EAAE,CAAC,mCAAY,CAAC;;uCACrB;AAGpB;IADP,IAAA,oCAAa,EAAC,GAAG,EAAE,CAAC,4BAAS,EAAE,GAAG,EAAE,CAAC,uCAAc,CAAC;;0CACpB;gBAhDtB,KAAK;IADjB,4BAAK;GACO,KAAK,CAiDjB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SysRole = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const permission_entity_1 = require("./permission.entity");
|
|
15
|
+
const role_permission_entity_1 = require("./role-permission.entity");
|
|
16
|
+
let SysRole = class SysRole extends sequelize_typescript_1.Model {
|
|
17
|
+
};
|
|
18
|
+
exports.SysRole = SysRole;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, unique: true }),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], SysRole.prototype, "name", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], SysRole.prototype, "displayName", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, sequelize_typescript_1.BelongsToMany)(() => permission_entity_1.Permission, () => role_permission_entity_1.RolePermission),
|
|
29
|
+
__metadata("design:type", Array)
|
|
30
|
+
], SysRole.prototype, "permissions", void 0);
|
|
31
|
+
exports.SysRole = SysRole = __decorate([
|
|
32
|
+
sequelize_typescript_1.Table
|
|
33
|
+
], SysRole);
|
|
34
|
+
//# sourceMappingURL=sys.role.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sys.role.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/sys.role.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAM8B;AAC9B,2DAAiD;AACjD,qEAA0D;AAGnD,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,4BAAK;CASjC,CAAA;AATY,0BAAO;AAEV;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;qCACtB;AAGb;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;4CACC;AAGrB;IADP,IAAA,oCAAa,EAAC,GAAG,EAAE,CAAC,8BAAU,EAAE,GAAG,EAAE,CAAC,uCAAc,CAAC;;4CACpB;kBARvB,OAAO;IADnB,4BAAK;GACO,OAAO,CASnB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { SysRole } from './sys.role.entity';
|
|
3
|
+
import { Status } from '../utils/enums/status';
|
|
4
|
+
export declare class SysUser extends Model {
|
|
5
|
+
name: string;
|
|
6
|
+
username: string;
|
|
7
|
+
email: string;
|
|
8
|
+
phoneExt: string;
|
|
9
|
+
phone: string;
|
|
10
|
+
password: string;
|
|
11
|
+
profilePicture?: string;
|
|
12
|
+
roleId?: number;
|
|
13
|
+
status: Status;
|
|
14
|
+
lastLogin?: Date;
|
|
15
|
+
role?: SysRole;
|
|
16
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SysUser = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const sys_role_entity_1 = require("./sys.role.entity");
|
|
15
|
+
const status_1 = require("../utils/enums/status");
|
|
16
|
+
let SysUser = class SysUser extends sequelize_typescript_1.Model {
|
|
17
|
+
};
|
|
18
|
+
exports.SysUser = SysUser;
|
|
19
|
+
__decorate([
|
|
20
|
+
sequelize_typescript_1.Column,
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], SysUser.prototype, "name", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], SysUser.prototype, "username", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, unique: true }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], SysUser.prototype, "email", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], SysUser.prototype, "phoneExt", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], SysUser.prototype, "phone", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], SysUser.prototype, "password", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
sequelize_typescript_1.Column,
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], SysUser.prototype, "profilePicture", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, sequelize_typescript_1.ForeignKey)(() => sys_role_entity_1.SysRole),
|
|
49
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
50
|
+
__metadata("design:type", Number)
|
|
51
|
+
], SysUser.prototype, "roleId", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, sequelize_typescript_1.Column)({
|
|
54
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
|
|
55
|
+
defaultValue: status_1.Status.ACTIVE,
|
|
56
|
+
}),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], SysUser.prototype, "status", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
61
|
+
__metadata("design:type", Date)
|
|
62
|
+
], SysUser.prototype, "lastLogin", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, sequelize_typescript_1.BelongsTo)(() => sys_role_entity_1.SysRole),
|
|
65
|
+
__metadata("design:type", sys_role_entity_1.SysRole)
|
|
66
|
+
], SysUser.prototype, "role", void 0);
|
|
67
|
+
exports.SysUser = SysUser = __decorate([
|
|
68
|
+
sequelize_typescript_1.Table
|
|
69
|
+
], SysUser);
|
|
70
|
+
//# sourceMappingURL=sys.user.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sys.user.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/sys.user.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAO8B;AAC9B,uDAA4C;AAC5C,kDAA+C;AAGxC,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,4BAAK;CAqCjC,CAAA;AArCY,0BAAO;AAEV;IADP,6BAAM;;qCACc;AAGb;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;yCACJ;AAGjB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;sCACrB;AAGd;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;yCACJ;AAGjB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;sCACP;AAGd;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;yCACJ;AAGjB;IADP,6BAAM;;+CACyB;AAIxB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,yBAAO,CAAC;IACzB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;uCACJ;AAMhB;IAJP,IAAA,6BAAM,EAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,eAAM,CAAC,CAAC;QAC7C,YAAY,EAAE,eAAM,CAAC,MAAM;KAC5B,CAAC;;uCACqB;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;8BACR,IAAI;0CAAC;AAGjB;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,yBAAO,CAAC;8BACV,yBAAO;qCAAC;kBApCZ,OAAO;IADnB,4BAAK;GACO,OAAO,CAqCnB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { Product } from './product.entity';
|
|
3
|
+
import { Status } from '../utils/enums/status';
|
|
4
|
+
export declare class Tag extends Model {
|
|
5
|
+
slug: string;
|
|
6
|
+
nameEn: string;
|
|
7
|
+
nameAr: string;
|
|
8
|
+
color?: string;
|
|
9
|
+
sortOrder: number;
|
|
10
|
+
status: Status;
|
|
11
|
+
products: Product[];
|
|
12
|
+
}
|