tt-entities 0.0.19 → 0.0.20
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 +3 -3
- package/dist/src/main.js +0 -2372
|
@@ -0,0 +1,54 @@
|
|
|
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.Tag = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const product_entity_1 = require("./product.entity");
|
|
15
|
+
const product_tag_entity_1 = require("./product-tag.entity");
|
|
16
|
+
const status_1 = require("../utils/enums/status");
|
|
17
|
+
let Tag = class Tag extends sequelize_typescript_1.Model {
|
|
18
|
+
};
|
|
19
|
+
exports.Tag = Tag;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, unique: true }),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], Tag.prototype, "slug", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], Tag.prototype, "nameEn", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], Tag.prototype, "nameAr", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], Tag.prototype, "color", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
|
|
38
|
+
__metadata("design:type", Number)
|
|
39
|
+
], Tag.prototype, "sortOrder", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, sequelize_typescript_1.Column)({
|
|
42
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
|
|
43
|
+
defaultValue: status_1.Status.ACTIVE,
|
|
44
|
+
}),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], Tag.prototype, "status", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, sequelize_typescript_1.BelongsToMany)(() => product_entity_1.Product, () => product_tag_entity_1.ProductTag),
|
|
49
|
+
__metadata("design:type", Array)
|
|
50
|
+
], Tag.prototype, "products", void 0);
|
|
51
|
+
exports.Tag = Tag = __decorate([
|
|
52
|
+
sequelize_typescript_1.Table
|
|
53
|
+
], Tag);
|
|
54
|
+
//# sourceMappingURL=tag.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/tag.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAM8B;AAC9B,qDAA2C;AAC3C,6DAAkD;AAClD,kDAA+C;AAGxC,IAAM,GAAG,GAAT,MAAM,GAAI,SAAQ,4BAAK;CAyB7B,CAAA;AAzBY,kBAAG;AAEN;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;iCACtB;AAGb;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;mCACN;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;mCACN;AAIf;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;kCACL;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;sCACF;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;;mCACqB;AAGf;IADP,IAAA,oCAAa,EAAC,GAAG,EAAE,CAAC,wBAAO,EAAE,GAAG,EAAE,CAAC,+BAAU,CAAC;;qCACnB;cAxBjB,GAAG;IADf,4BAAK;GACO,GAAG,CAyBf"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { Status } from '../utils/enums/status';
|
|
3
|
+
import { Language } from '../utils/enums/language';
|
|
4
|
+
import { Country } from './country.entity';
|
|
5
|
+
import { Gender } from '../utils/enums/gender';
|
|
6
|
+
export declare class User extends Model {
|
|
7
|
+
firstName?: string;
|
|
8
|
+
lastName?: string;
|
|
9
|
+
password: string;
|
|
10
|
+
status: Status;
|
|
11
|
+
email: string;
|
|
12
|
+
phone?: string;
|
|
13
|
+
phoneExt?: string;
|
|
14
|
+
birthday?: Date;
|
|
15
|
+
facebookId?: string;
|
|
16
|
+
googleId?: string;
|
|
17
|
+
appleId?: string;
|
|
18
|
+
preferredLanguage: Language;
|
|
19
|
+
preferredCountryId?: number;
|
|
20
|
+
profilePic?: string;
|
|
21
|
+
lastLogin: Date;
|
|
22
|
+
isBlocked: boolean;
|
|
23
|
+
isVerified: boolean;
|
|
24
|
+
refCode: string;
|
|
25
|
+
gender: Gender;
|
|
26
|
+
country: Country;
|
|
27
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
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.User = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const status_1 = require("../utils/enums/status");
|
|
15
|
+
const language_1 = require("../utils/enums/language");
|
|
16
|
+
const country_entity_1 = require("./country.entity");
|
|
17
|
+
const gender_1 = require("../utils/enums/gender");
|
|
18
|
+
let User = class User extends sequelize_typescript_1.Model {
|
|
19
|
+
};
|
|
20
|
+
exports.User = User;
|
|
21
|
+
__decorate([
|
|
22
|
+
sequelize_typescript_1.Column,
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], User.prototype, "firstName", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
sequelize_typescript_1.Column,
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], User.prototype, "lastName", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
sequelize_typescript_1.Column,
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], User.prototype, "password", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, sequelize_typescript_1.Column)({
|
|
35
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
|
|
36
|
+
defaultValue: status_1.Status.ACTIVE,
|
|
37
|
+
}),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], User.prototype, "status", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, validate: { isEmail: { msg: 'Invalid Email' } } }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], User.prototype, "email", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
sequelize_typescript_1.Column,
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], User.prototype, "phone", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
sequelize_typescript_1.Column,
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], User.prototype, "phoneExt", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
sequelize_typescript_1.Column,
|
|
54
|
+
__metadata("design:type", Date)
|
|
55
|
+
], User.prototype, "birthday", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
sequelize_typescript_1.Column,
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], User.prototype, "facebookId", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
sequelize_typescript_1.Column,
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], User.prototype, "googleId", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
sequelize_typescript_1.Column,
|
|
66
|
+
__metadata("design:type", String)
|
|
67
|
+
], User.prototype, "appleId", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, sequelize_typescript_1.Column)({
|
|
70
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(language_1.Language)),
|
|
71
|
+
defaultValue: language_1.Language.ENGLISH,
|
|
72
|
+
}),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], User.prototype, "preferredLanguage", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, sequelize_typescript_1.ForeignKey)(() => country_entity_1.Country),
|
|
77
|
+
sequelize_typescript_1.Column,
|
|
78
|
+
__metadata("design:type", Number)
|
|
79
|
+
], User.prototype, "preferredCountryId", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
sequelize_typescript_1.Column,
|
|
82
|
+
__metadata("design:type", String)
|
|
83
|
+
], User.prototype, "profilePic", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
sequelize_typescript_1.Column,
|
|
86
|
+
__metadata("design:type", Date)
|
|
87
|
+
], User.prototype, "lastLogin", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, defaultValue: false }),
|
|
90
|
+
__metadata("design:type", Boolean)
|
|
91
|
+
], User.prototype, "isBlocked", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: false }),
|
|
94
|
+
__metadata("design:type", Boolean)
|
|
95
|
+
], User.prototype, "isVerified", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
sequelize_typescript_1.Column,
|
|
98
|
+
__metadata("design:type", String)
|
|
99
|
+
], User.prototype, "refCode", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, sequelize_typescript_1.Column)({
|
|
102
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(gender_1.Gender)),
|
|
103
|
+
defaultValue: gender_1.Gender.PREFER_NOT_TO_SAY,
|
|
104
|
+
}),
|
|
105
|
+
__metadata("design:type", String)
|
|
106
|
+
], User.prototype, "gender", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, sequelize_typescript_1.BelongsTo)(() => country_entity_1.Country),
|
|
109
|
+
__metadata("design:type", country_entity_1.Country)
|
|
110
|
+
], User.prototype, "country", void 0);
|
|
111
|
+
exports.User = User = __decorate([
|
|
112
|
+
sequelize_typescript_1.Table
|
|
113
|
+
], User);
|
|
114
|
+
//# sourceMappingURL=user.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/user.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAO8B;AAC9B,kDAA+C;AAC/C,sDAAmD;AACnD,qDAA2C;AAC3C,kDAA+C;AAGxC,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,4BAAK;CAsE9B,CAAA;AAtEY,oBAAI;AAEP;IADP,6BAAM;;uCACoB;AAGnB;IADP,6BAAM;;sCACmB;AAGlB;IADP,6BAAM;;sCACkB;AAMjB;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;;oCACqB;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC;;mCACxD;AAGd;IADP,6BAAM;;mCACgB;AAGf;IADP,6BAAM;;sCACmB;AAGlB;IADP,6BAAM;8BACY,IAAI;sCAAC;AAGhB;IADP,6BAAM;;wCACqB;AAGpB;IADP,6BAAM;;sCACmB;AAGlB;IADP,6BAAM;;qCACkB;AAMjB;IAJP,IAAA,6BAAM,EAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,mBAAQ,CAAC,CAAC;QAC/C,YAAY,EAAE,mBAAQ,CAAC,OAAO;KAC/B,CAAC;;+CACkC;AAI5B;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;IACzB,6BAAM;;gDAC6B;AAG5B;IADP,6BAAM;;wCACqB;AAGpB;IADP,6BAAM;8BACY,IAAI;uCAAC;AAGhB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;;uCACvB;AAGnB;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;;wCACJ;AAGpB;IADP,6BAAM;;qCACiB;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,iBAAiB;KACvC,CAAC;;oCACqB;AAGf;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;8BACR,wBAAO;qCAAC;eArEd,IAAI;IADhB,4BAAK;GACO,IAAI,CAsEhB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { User } from './user.entity';
|
|
3
|
+
import { Status } from '../utils/enums/status';
|
|
4
|
+
export declare class UserDevice extends Model {
|
|
5
|
+
userId: number;
|
|
6
|
+
deviceId?: string;
|
|
7
|
+
fcmToken?: string;
|
|
8
|
+
status: Status;
|
|
9
|
+
osSystem: string;
|
|
10
|
+
user: User;
|
|
11
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
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.UserDevice = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const user_entity_1 = require("./user.entity");
|
|
15
|
+
const status_1 = require("../utils/enums/status");
|
|
16
|
+
const osName_1 = require("../utils/enums/osName");
|
|
17
|
+
let UserDevice = class UserDevice extends sequelize_typescript_1.Model {
|
|
18
|
+
};
|
|
19
|
+
exports.UserDevice = UserDevice;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, sequelize_typescript_1.ForeignKey)(() => user_entity_1.User),
|
|
22
|
+
sequelize_typescript_1.Column,
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], UserDevice.prototype, "userId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
sequelize_typescript_1.Column,
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], UserDevice.prototype, "deviceId", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
sequelize_typescript_1.Column,
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], UserDevice.prototype, "fcmToken", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, sequelize_typescript_1.Column)({
|
|
35
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
|
|
36
|
+
defaultValue: status_1.Status.ACTIVE,
|
|
37
|
+
}),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], UserDevice.prototype, "status", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, sequelize_typescript_1.Column)({
|
|
42
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(osName_1.OsName)),
|
|
43
|
+
allowNull: true,
|
|
44
|
+
}),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], UserDevice.prototype, "osSystem", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, sequelize_typescript_1.BelongsTo)(() => user_entity_1.User),
|
|
49
|
+
__metadata("design:type", user_entity_1.User)
|
|
50
|
+
], UserDevice.prototype, "user", void 0);
|
|
51
|
+
exports.UserDevice = UserDevice = __decorate([
|
|
52
|
+
sequelize_typescript_1.Table
|
|
53
|
+
], UserDevice);
|
|
54
|
+
//# sourceMappingURL=userDevice.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userDevice.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/userDevice.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAa8B;AAC9B,+CAAqC;AACrC,kDAA+C;AAC/C,kDAA+C;AAGxC,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,4BAAK;CAqBpC,CAAA;AArBY,gCAAU;AAGb;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,kBAAI,CAAC;IACtB,6BAAM;;0CACgB;AAEf;IADP,6BAAM;;4CACmB;AAElB;IADP,6BAAM;;4CACmB;AAKlB;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;;0CACqB;AAMf;IAJP,IAAA,6BAAM,EAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,eAAM,CAAC,CAAC;QAC7C,SAAS,EAAE,IAAI;KAChB,CAAC;;4CACuB;AAEjB;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,CAAC;8BACR,kBAAI;wCAAC;qBApBR,UAAU;IADtB,4BAAK;GACO,UAAU,CAqBtB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { VariantType } from './variant-type.entity';
|
|
3
|
+
import { Status } from '../utils/enums/status';
|
|
4
|
+
export declare class VariantOption extends Model {
|
|
5
|
+
variantTypeId: number;
|
|
6
|
+
nameEn: string;
|
|
7
|
+
nameAr: string;
|
|
8
|
+
sortOrder: number;
|
|
9
|
+
status: Status;
|
|
10
|
+
variantType: VariantType;
|
|
11
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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.VariantOption = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const variant_type_entity_1 = require("./variant-type.entity");
|
|
15
|
+
const status_1 = require("../utils/enums/status");
|
|
16
|
+
let VariantOption = class VariantOption extends sequelize_typescript_1.Model {
|
|
17
|
+
};
|
|
18
|
+
exports.VariantOption = VariantOption;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, sequelize_typescript_1.ForeignKey)(() => variant_type_entity_1.VariantType),
|
|
21
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
22
|
+
__metadata("design:type", Number)
|
|
23
|
+
], VariantOption.prototype, "variantTypeId", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], VariantOption.prototype, "nameEn", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], VariantOption.prototype, "nameAr", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
|
|
34
|
+
__metadata("design:type", Number)
|
|
35
|
+
], VariantOption.prototype, "sortOrder", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, sequelize_typescript_1.Column)({
|
|
38
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
|
|
39
|
+
defaultValue: status_1.Status.ACTIVE,
|
|
40
|
+
}),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], VariantOption.prototype, "status", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, sequelize_typescript_1.BelongsTo)(() => variant_type_entity_1.VariantType),
|
|
45
|
+
__metadata("design:type", variant_type_entity_1.VariantType)
|
|
46
|
+
], VariantOption.prototype, "variantType", void 0);
|
|
47
|
+
exports.VariantOption = VariantOption = __decorate([
|
|
48
|
+
sequelize_typescript_1.Table
|
|
49
|
+
], VariantOption);
|
|
50
|
+
//# sourceMappingURL=variant-option.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variant-option.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/variant-option.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAO8B;AAC9B,+DAAoD;AACpD,kDAA+C;AAGxC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,4BAAK;CAsBvC,CAAA;AAtBY,sCAAa;AAGhB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,iCAAW,CAAC;IAC7B,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;oDACC;AAGtB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;6CACN;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;6CACN;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;gDACF;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;;6CACqB;AAGf;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,iCAAW,CAAC;8BACR,iCAAW;kDAAC;wBArBtB,aAAa;IADzB,4BAAK;GACO,aAAa,CAsBzB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
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.VariantType = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const status_1 = require("../utils/enums/status");
|
|
15
|
+
const sequelize_typescript_2 = require("sequelize-typescript");
|
|
16
|
+
let VariantType = class VariantType extends sequelize_typescript_1.Model {
|
|
17
|
+
};
|
|
18
|
+
exports.VariantType = VariantType;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], VariantType.prototype, "nameEn", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], VariantType.prototype, "nameAr", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, sequelize_typescript_1.Column)({
|
|
29
|
+
type: sequelize_typescript_2.DataType.ENUM(...Object.values(status_1.Status)),
|
|
30
|
+
defaultValue: status_1.Status.ACTIVE,
|
|
31
|
+
}),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], VariantType.prototype, "status", void 0);
|
|
34
|
+
exports.VariantType = VariantType = __decorate([
|
|
35
|
+
sequelize_typescript_1.Table
|
|
36
|
+
], VariantType);
|
|
37
|
+
//# sourceMappingURL=variant-type.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variant-type.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/variant-type.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAAqE;AACrE,kDAA+C;AAC/C,+DAAgD;AAGzC,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,4BAAK;CAYrC,CAAA;AAZY,kCAAW;AAEd;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;2CACN;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;2CACN;AAMf;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;;2CACqB;sBAXZ,WAAW;IADvB,4BAAK;GACO,WAAW,CAYvB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { Vendor } from './vendor.entity';
|
|
3
|
+
import { Product } from './product.entity';
|
|
4
|
+
import { ProductVariant } from './product-variant.entity';
|
|
5
|
+
import { Status } from '../utils/enums/status';
|
|
6
|
+
export declare class VendorProduct extends Model {
|
|
7
|
+
vendorId: number;
|
|
8
|
+
productId: number;
|
|
9
|
+
productVariantId?: number;
|
|
10
|
+
costPrice: number;
|
|
11
|
+
vendorSku?: string;
|
|
12
|
+
leadTimeDays?: number;
|
|
13
|
+
moq: number;
|
|
14
|
+
isPreferred: boolean;
|
|
15
|
+
status: Status;
|
|
16
|
+
vendor: Vendor;
|
|
17
|
+
product: Product;
|
|
18
|
+
variant?: ProductVariant;
|
|
19
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
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.VendorProduct = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const vendor_entity_1 = require("./vendor.entity");
|
|
15
|
+
const product_entity_1 = require("./product.entity");
|
|
16
|
+
const product_variant_entity_1 = require("./product-variant.entity");
|
|
17
|
+
const status_1 = require("../utils/enums/status");
|
|
18
|
+
let VendorProduct = class VendorProduct extends sequelize_typescript_1.Model {
|
|
19
|
+
};
|
|
20
|
+
exports.VendorProduct = VendorProduct;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, sequelize_typescript_1.ForeignKey)(() => vendor_entity_1.Vendor),
|
|
23
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
24
|
+
__metadata("design:type", Number)
|
|
25
|
+
], VendorProduct.prototype, "vendorId", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, sequelize_typescript_1.ForeignKey)(() => product_entity_1.Product),
|
|
28
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], VendorProduct.prototype, "productId", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, sequelize_typescript_1.ForeignKey)(() => product_variant_entity_1.ProductVariant),
|
|
33
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
34
|
+
__metadata("design:type", Number)
|
|
35
|
+
], VendorProduct.prototype, "productVariantId", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: false }),
|
|
38
|
+
__metadata("design:type", Number)
|
|
39
|
+
], VendorProduct.prototype, "costPrice", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], VendorProduct.prototype, "vendorSku", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
46
|
+
__metadata("design:type", Number)
|
|
47
|
+
], VendorProduct.prototype, "leadTimeDays", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: 1 }),
|
|
50
|
+
__metadata("design:type", Number)
|
|
51
|
+
], VendorProduct.prototype, "moq", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: false }),
|
|
54
|
+
__metadata("design:type", Boolean)
|
|
55
|
+
], VendorProduct.prototype, "isPreferred", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, sequelize_typescript_1.Column)({
|
|
58
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
|
|
59
|
+
defaultValue: status_1.Status.ACTIVE,
|
|
60
|
+
}),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], VendorProduct.prototype, "status", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, sequelize_typescript_1.BelongsTo)(() => vendor_entity_1.Vendor),
|
|
65
|
+
__metadata("design:type", vendor_entity_1.Vendor)
|
|
66
|
+
], VendorProduct.prototype, "vendor", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, sequelize_typescript_1.BelongsTo)(() => product_entity_1.Product),
|
|
69
|
+
__metadata("design:type", product_entity_1.Product)
|
|
70
|
+
], VendorProduct.prototype, "product", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, sequelize_typescript_1.BelongsTo)(() => product_variant_entity_1.ProductVariant),
|
|
73
|
+
__metadata("design:type", product_variant_entity_1.ProductVariant)
|
|
74
|
+
], VendorProduct.prototype, "variant", void 0);
|
|
75
|
+
exports.VendorProduct = VendorProduct = __decorate([
|
|
76
|
+
sequelize_typescript_1.Table
|
|
77
|
+
], VendorProduct);
|
|
78
|
+
//# sourceMappingURL=vendor-product.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vendor-product.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/vendor-product.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAO8B;AAC9B,mDAAyC;AACzC,qDAA2C;AAC3C,qEAA0D;AAC1D,kDAA+C;AAGxC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,4BAAK;CAkDvC,CAAA;AAlDY,sCAAa;AAGhB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,sBAAM,CAAC;IACxB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;+CACJ;AAIjB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;IACzB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;gDACH;AAKlB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,uCAAc,CAAC;IAChC,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;uDACM;AAI1B;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;gDAClC;AAIlB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;gDACD;AAInB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;mDACE;AAItB;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;0CACR;AAIZ;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;;kDACH;AAMrB;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;;6CACqB;AAKf;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,sBAAM,CAAC;8BACR,sBAAM;6CAAC;AAGf;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;wBAjDtB,aAAa;IADzB,4BAAK;GACO,aAAa,CAkDzB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { Country } from './country.entity';
|
|
3
|
+
import { Status } from '../utils/enums/status';
|
|
4
|
+
export declare class Vendor extends Model {
|
|
5
|
+
nameEn: string;
|
|
6
|
+
nameAr: string;
|
|
7
|
+
contactPerson?: string;
|
|
8
|
+
email?: string;
|
|
9
|
+
phone?: string;
|
|
10
|
+
addressEn?: string;
|
|
11
|
+
addressAr?: string;
|
|
12
|
+
countryId?: number;
|
|
13
|
+
taxNumber?: string;
|
|
14
|
+
commercialRegNumber?: string;
|
|
15
|
+
paymentTermsDays: number;
|
|
16
|
+
notes?: string;
|
|
17
|
+
status: Status;
|
|
18
|
+
country: Country;
|
|
19
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
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.Vendor = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const country_entity_1 = require("./country.entity");
|
|
15
|
+
const status_1 = require("../utils/enums/status");
|
|
16
|
+
let Vendor = class Vendor extends sequelize_typescript_1.Model {
|
|
17
|
+
};
|
|
18
|
+
exports.Vendor = Vendor;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], Vendor.prototype, "nameEn", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], Vendor.prototype, "nameAr", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], Vendor.prototype, "contactPerson", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], Vendor.prototype, "email", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], Vendor.prototype, "phone", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], Vendor.prototype, "addressEn", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: true }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], Vendor.prototype, "addressAr", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, sequelize_typescript_1.ForeignKey)(() => country_entity_1.Country),
|
|
49
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
50
|
+
__metadata("design:type", Number)
|
|
51
|
+
], Vendor.prototype, "countryId", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], Vendor.prototype, "taxNumber", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], Vendor.prototype, "commercialRegNumber", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, sequelize_typescript_1.Column)({ defaultValue: 0 }),
|
|
62
|
+
__metadata("design:type", Number)
|
|
63
|
+
], Vendor.prototype, "paymentTermsDays", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
66
|
+
__metadata("design:type", String)
|
|
67
|
+
], Vendor.prototype, "notes", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, sequelize_typescript_1.Column)({
|
|
70
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
|
|
71
|
+
defaultValue: status_1.Status.ACTIVE,
|
|
72
|
+
}),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], Vendor.prototype, "status", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, sequelize_typescript_1.BelongsTo)(() => country_entity_1.Country),
|
|
77
|
+
__metadata("design:type", country_entity_1.Country)
|
|
78
|
+
], Vendor.prototype, "country", void 0);
|
|
79
|
+
exports.Vendor = Vendor = __decorate([
|
|
80
|
+
sequelize_typescript_1.Table
|
|
81
|
+
], Vendor);
|
|
82
|
+
//# sourceMappingURL=vendor.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vendor.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/vendor.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAQ8B;AAC9B,qDAA2C;AAC3C,kDAA+C;AAGxC,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,4BAAK;CAiDhC,CAAA;AAjDY,wBAAM;AAET;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;sCACN;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;sCACN;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;6CACG;AAGvB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;qCACL;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;qCACL;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;yCACtB;AAGnB;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;yCACtB;AAInB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;IACzB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;yCACD;AAGnB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;yCACD;AAGnB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;mDACS;AAI7B;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;gDACK;AAGzB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;qCACL;AAMf;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;;sCACqB;AAKf;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;8BACR,wBAAO;uCAAC;iBAhDd,MAAM;IADlB,4BAAK;GACO,MAAM,CAiDlB"}
|