tt-entities 0.0.17 → 0.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. package/dist/libs/tatayab-entities-library/src/entities/product-store.entity.d.ts +3 -0
  2. package/dist/libs/tatayab-entities-library/src/entities/product-store.entity.js +12 -0
  3. package/dist/libs/tatayab-entities-library/src/entities/product-store.entity.js.map +1 -1
  4. package/dist/libs/tatayab-entities-library/src/entities/product-tag.entity.d.ts +5 -0
  5. package/dist/libs/tatayab-entities-library/src/entities/product-tag.entity.js +32 -0
  6. package/dist/libs/tatayab-entities-library/src/entities/product-tag.entity.js.map +1 -0
  7. package/dist/libs/tatayab-entities-library/src/entities/product.entity.d.ts +2 -0
  8. package/dist/libs/tatayab-entities-library/src/entities/product.entity.js +6 -0
  9. package/dist/libs/tatayab-entities-library/src/entities/product.entity.js.map +1 -1
  10. package/dist/libs/tatayab-entities-library/src/entities/tag.entity.d.ts +12 -0
  11. package/dist/libs/tatayab-entities-library/src/entities/tag.entity.js +54 -0
  12. package/dist/libs/tatayab-entities-library/src/entities/tag.entity.js.map +1 -0
  13. package/dist/libs/tatayab-entities-library/src/index.d.ts +2 -1
  14. package/dist/libs/tatayab-entities-library/src/index.js +9 -5
  15. package/dist/libs/tatayab-entities-library/src/index.js.map +1 -1
  16. package/dist/src/main.js +290 -220
  17. package/libs/tatayab-entities-library/src/entities/product-store.entity.ts +11 -1
  18. package/libs/tatayab-entities-library/src/entities/product-tag.entity.ts +19 -0
  19. package/libs/tatayab-entities-library/src/entities/product.entity.ts +5 -0
  20. package/libs/tatayab-entities-library/src/entities/tag.entity.ts +38 -0
  21. package/libs/tatayab-entities-library/src/index.ts +7 -3
  22. package/package.json +1 -1
  23. package/libs/tatayab-entities-library/src/entities/translation.entity.ts +0 -17
@@ -4,5 +4,8 @@ export declare class ProductStore extends Model {
4
4
  productId: number;
5
5
  storeId: number;
6
6
  price?: number;
7
+ salePrice?: number;
8
+ saleStartDate?: Date;
9
+ saleEndDate?: Date;
7
10
  status: Status;
8
11
  }
@@ -31,6 +31,18 @@ __decorate([
31
31
  (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: true }),
32
32
  __metadata("design:type", Number)
33
33
  ], ProductStore.prototype, "price", void 0);
34
+ __decorate([
35
+ (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: true }),
36
+ __metadata("design:type", Number)
37
+ ], ProductStore.prototype, "salePrice", void 0);
38
+ __decorate([
39
+ (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DATE, allowNull: true }),
40
+ __metadata("design:type", Date)
41
+ ], ProductStore.prototype, "saleStartDate", void 0);
42
+ __decorate([
43
+ (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DATE, allowNull: true }),
44
+ __metadata("design:type", Date)
45
+ ], ProductStore.prototype, "saleEndDate", void 0);
34
46
  __decorate([
35
47
  (0, sequelize_typescript_1.Column)({
36
48
  type: sequelize_typescript_1.DataType.ENUM(...Object.values(status_1.Status)),
@@ -1 +1 @@
1
- {"version":3,"file":"product-store.entity.js","sourceRoot":"","sources":["../../../../../libs/tatayab-entities-library/src/entities/product-store.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAM8B;AAC9B,qDAA2C;AAC3C,iDAAuC;AACvC,kDAA+C;AAGxC,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,4BAAK;CAkBtC,CAAA;AAlBY,oCAAY;AAGf;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;IACzB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;+CACH;AAIlB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,oBAAK,CAAC;IACvB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;6CACL;AAIhB;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;2CACpC;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;;4CACqB;uBAjBZ,YAAY;IADxB,4BAAK;GACO,YAAY,CAkBxB"}
1
+ {"version":3,"file":"product-store.entity.js","sourceRoot":"","sources":["../../../../../libs/tatayab-entities-library/src/entities/product-store.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAM8B;AAC9B,qDAA2C;AAC3C,iDAAuC;AACvC,kDAA+C;AAGxC,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,4BAAK;CA4BtC,CAAA;AA5BY,oCAAY;AAGf;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;IACzB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;+CACH;AAIlB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,oBAAK,CAAC;IACvB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;6CACL;AAIhB;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;2CACpC;AAIf;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;+CAChC;AAGnB;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;8BACzB,IAAI;mDAAC;AAGrB;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;8BAC3B,IAAI;iDAAC;AAMnB;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;;4CACqB;uBA3BZ,YAAY;IADxB,4BAAK;GACO,YAAY,CA4BxB"}
@@ -0,0 +1,5 @@
1
+ import { Model } from 'sequelize-typescript';
2
+ export declare class ProductTag extends Model {
3
+ productId: number;
4
+ tagId: number;
5
+ }
@@ -0,0 +1,32 @@
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.ProductTag = void 0;
13
+ const sequelize_typescript_1 = require("sequelize-typescript");
14
+ const product_entity_1 = require("./product.entity");
15
+ const tag_entity_1 = require("./tag.entity");
16
+ let ProductTag = class ProductTag extends sequelize_typescript_1.Model {
17
+ };
18
+ exports.ProductTag = ProductTag;
19
+ __decorate([
20
+ (0, sequelize_typescript_1.ForeignKey)(() => product_entity_1.Product),
21
+ (0, sequelize_typescript_1.Column)({ allowNull: false }),
22
+ __metadata("design:type", Number)
23
+ ], ProductTag.prototype, "productId", void 0);
24
+ __decorate([
25
+ (0, sequelize_typescript_1.ForeignKey)(() => tag_entity_1.Tag),
26
+ (0, sequelize_typescript_1.Column)({ allowNull: false }),
27
+ __metadata("design:type", Number)
28
+ ], ProductTag.prototype, "tagId", void 0);
29
+ exports.ProductTag = ProductTag = __decorate([
30
+ sequelize_typescript_1.Table
31
+ ], ProductTag);
32
+ //# sourceMappingURL=product-tag.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-tag.entity.js","sourceRoot":"","sources":["../../../../../libs/tatayab-entities-library/src/entities/product-tag.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAK8B;AAC9B,qDAA2C;AAC3C,6CAAmC;AAG5B,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,4BAAK;CAQpC,CAAA;AARY,gCAAU;AAGb;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;IACzB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;6CACH;AAIlB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,gBAAG,CAAC;IACrB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;yCACP;qBAPX,UAAU;IADtB,4BAAK;GACO,UAAU,CAQtB"}
@@ -4,6 +4,7 @@ import { Category } from './category.entity';
4
4
  import { ProductMedia } from './product-media.entity';
5
5
  import { ProductVariant } from './product-variant.entity';
6
6
  import { Store } from './store.entity';
7
+ import { Tag } from './tag.entity';
7
8
  import { Status } from '../utils/enums/status';
8
9
  export declare class Product extends Model {
9
10
  nameEn: string;
@@ -24,4 +25,5 @@ export declare class Product extends Model {
24
25
  media: ProductMedia[];
25
26
  variants: ProductVariant[];
26
27
  stores: Store[];
28
+ tags: Tag[];
27
29
  }
@@ -16,7 +16,9 @@ const category_entity_1 = require("./category.entity");
16
16
  const product_media_entity_1 = require("./product-media.entity");
17
17
  const product_variant_entity_1 = require("./product-variant.entity");
18
18
  const product_store_entity_1 = require("./product-store.entity");
19
+ const product_tag_entity_1 = require("./product-tag.entity");
19
20
  const store_entity_1 = require("./store.entity");
21
+ const tag_entity_1 = require("./tag.entity");
20
22
  const status_1 = require("../utils/enums/status");
21
23
  let Product = class Product extends sequelize_typescript_1.Model {
22
24
  };
@@ -98,6 +100,10 @@ __decorate([
98
100
  (0, sequelize_typescript_1.BelongsToMany)(() => store_entity_1.Store, () => product_store_entity_1.ProductStore),
99
101
  __metadata("design:type", Array)
100
102
  ], Product.prototype, "stores", void 0);
103
+ __decorate([
104
+ (0, sequelize_typescript_1.BelongsToMany)(() => tag_entity_1.Tag, () => product_tag_entity_1.ProductTag),
105
+ __metadata("design:type", Array)
106
+ ], Product.prototype, "tags", void 0);
101
107
  exports.Product = Product = __decorate([
102
108
  sequelize_typescript_1.Table
103
109
  ], Product);
@@ -1 +1 @@
1
- {"version":3,"file":"product.entity.js","sourceRoot":"","sources":["../../../../../libs/tatayab-entities-library/src/entities/product.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAS8B;AAC9B,iDAAuC;AACvC,uDAA6C;AAC7C,iEAAsD;AACtD,qEAA0D;AAC1D,iEAAsD;AACtD,iDAAuC;AACvC,kDAA+C;AAGxC,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,4BAAK;CA8DjC,CAAA;AA9DY,0BAAO;AAEV;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;uCACN;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;uCACN;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,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GAAG,EAAE,CAAC,0BAAQ,CAAC;8BACR,0BAAQ;yCAAC;AAGnB;IADP,IAAA,8BAAO,EAAC,GAAG,EAAE,CAAC,mCAAY,CAAC;;sCACE;AAGtB;IADP,IAAA,8BAAO,EAAC,GAAG,EAAE,CAAC,uCAAc,CAAC;;yCACK;AAG3B;IADP,IAAA,oCAAa,EAAC,GAAG,EAAE,CAAC,oBAAK,EAAE,GAAG,EAAE,CAAC,mCAAY,CAAC;;uCACvB;kBA7Db,OAAO;IADnB,4BAAK;GACO,OAAO,CA8DnB"}
1
+ {"version":3,"file":"product.entity.js","sourceRoot":"","sources":["../../../../../libs/tatayab-entities-library/src/entities/product.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAS8B;AAC9B,iDAAuC;AACvC,uDAA6C;AAC7C,iEAAsD;AACtD,qEAA0D;AAC1D,iEAAsD;AACtD,6DAAkD;AAClD,iDAAuC;AACvC,6CAAmC;AACnC,kDAA+C;AAGxC,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,4BAAK;CAiEjC,CAAA;AAjEY,0BAAO;AAEV;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;uCACN;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;uCACN;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;8CAClB;AAGvB;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;8CAClB;AAGvB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;oCACP;AAGb;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;wCACH;AAIjB;IADP,IAAA,6BAAM,EAA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P,IAAA,oCAAa,EAAC,GAAG,EAAE,CAAC,gBAAG,EAAE,GAAG,EAAE,CAAC,+BAAU,CAAC;;qCACvB;kBAhET,OAAO;IADnB,4BAAK;GACO,OAAO,CAiEnB"}
@@ -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
+ }
@@ -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"}
@@ -1,7 +1,6 @@
1
1
  import { ModelCtor } from 'sequelize-typescript';
2
2
  export { ApiKey } from './entities/apikey.entity';
3
3
  export { Country } from './entities/country.entity';
4
- export { Translation } from './entities/translation.entity';
5
4
  export { Area } from './entities/area.entity';
6
5
  export { SysRole } from './entities/sys.role.entity';
7
6
  export { SysUser } from './entities/sys.user.entity';
@@ -15,6 +14,8 @@ export { Product } from './entities/product.entity';
15
14
  export { ProductMedia, MediaType } from './entities/product-media.entity';
16
15
  export { ProductVariant } from './entities/product-variant.entity';
17
16
  export { ProductVariantOption } from './entities/product-variant-option.entity';
17
+ export { Tag } from './entities/tag.entity';
18
+ export { ProductTag } from './entities/product-tag.entity';
18
19
  export { Store } from './entities/store.entity';
19
20
  export { ProductStore } from './entities/product-store.entity';
20
21
  export { Inventory } from './entities/inventory.entity';
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StockMovementType = exports.PurchaseOrderStatus = exports.Gender = exports.Status = exports.Language = exports.VersionType = exports.ProductApp = exports.OsName = exports.RolePermission = exports.Permission = exports.PurchaseOrderItemStatus = exports.PurchaseOrderItem = exports.PurchaseOrder = exports.VendorProduct = exports.Vendor = exports.StockMovement = exports.InventoryStock = exports.StoreInventory = exports.Inventory = exports.ProductStore = exports.Store = exports.ProductVariantOption = exports.ProductVariant = exports.MediaType = exports.ProductMedia = exports.Product = exports.VariantOption = exports.VariantType = exports.Brand = exports.Category = exports.UserDevice = exports.User = exports.SysUser = exports.SysRole = exports.Area = exports.Translation = exports.Country = exports.ApiKey = void 0;
3
+ exports.StockMovementType = exports.PurchaseOrderStatus = exports.Gender = exports.Status = exports.Language = exports.VersionType = exports.ProductApp = exports.OsName = exports.RolePermission = exports.Permission = exports.PurchaseOrderItemStatus = exports.PurchaseOrderItem = exports.PurchaseOrder = exports.VendorProduct = exports.Vendor = exports.StockMovement = exports.InventoryStock = exports.StoreInventory = exports.Inventory = exports.ProductStore = exports.Store = exports.ProductTag = exports.Tag = exports.ProductVariantOption = exports.ProductVariant = exports.MediaType = exports.ProductMedia = exports.Product = exports.VariantOption = exports.VariantType = exports.Brand = exports.Category = exports.UserDevice = exports.User = exports.SysUser = exports.SysRole = exports.Area = exports.Country = exports.ApiKey = void 0;
4
4
  exports.getDbModels = getDbModels;
5
5
  const country_entity_1 = require("./entities/country.entity");
6
- const translation_entity_1 = require("./entities/translation.entity");
7
6
  const area_entity_1 = require("./entities/area.entity");
8
7
  const sys_role_entity_1 = require("./entities/sys.role.entity");
9
8
  const sys_user_entity_1 = require("./entities/sys.user.entity");
@@ -18,6 +17,8 @@ const product_entity_1 = require("./entities/product.entity");
18
17
  const product_media_entity_1 = require("./entities/product-media.entity");
19
18
  const product_variant_entity_1 = require("./entities/product-variant.entity");
20
19
  const product_variant_option_entity_1 = require("./entities/product-variant-option.entity");
20
+ const tag_entity_1 = require("./entities/tag.entity");
21
+ const product_tag_entity_1 = require("./entities/product-tag.entity");
21
22
  const store_entity_1 = require("./entities/store.entity");
22
23
  const product_store_entity_1 = require("./entities/product-store.entity");
23
24
  const inventory_entity_1 = require("./entities/inventory.entity");
@@ -34,8 +35,6 @@ var apikey_entity_2 = require("./entities/apikey.entity");
34
35
  Object.defineProperty(exports, "ApiKey", { enumerable: true, get: function () { return apikey_entity_2.ApiKey; } });
35
36
  var country_entity_2 = require("./entities/country.entity");
36
37
  Object.defineProperty(exports, "Country", { enumerable: true, get: function () { return country_entity_2.Country; } });
37
- var translation_entity_2 = require("./entities/translation.entity");
38
- Object.defineProperty(exports, "Translation", { enumerable: true, get: function () { return translation_entity_2.Translation; } });
39
38
  var area_entity_2 = require("./entities/area.entity");
40
39
  Object.defineProperty(exports, "Area", { enumerable: true, get: function () { return area_entity_2.Area; } });
41
40
  var sys_role_entity_2 = require("./entities/sys.role.entity");
@@ -63,6 +62,10 @@ var product_variant_entity_2 = require("./entities/product-variant.entity");
63
62
  Object.defineProperty(exports, "ProductVariant", { enumerable: true, get: function () { return product_variant_entity_2.ProductVariant; } });
64
63
  var product_variant_option_entity_2 = require("./entities/product-variant-option.entity");
65
64
  Object.defineProperty(exports, "ProductVariantOption", { enumerable: true, get: function () { return product_variant_option_entity_2.ProductVariantOption; } });
65
+ var tag_entity_2 = require("./entities/tag.entity");
66
+ Object.defineProperty(exports, "Tag", { enumerable: true, get: function () { return tag_entity_2.Tag; } });
67
+ var product_tag_entity_2 = require("./entities/product-tag.entity");
68
+ Object.defineProperty(exports, "ProductTag", { enumerable: true, get: function () { return product_tag_entity_2.ProductTag; } });
66
69
  var store_entity_2 = require("./entities/store.entity");
67
70
  Object.defineProperty(exports, "Store", { enumerable: true, get: function () { return store_entity_2.Store; } });
68
71
  var product_store_entity_2 = require("./entities/product-store.entity");
@@ -111,7 +114,6 @@ function getDbModels() {
111
114
  country_entity_1.Country,
112
115
  sys_role_entity_1.SysRole,
113
116
  sys_user_entity_1.SysUser,
114
- translation_entity_1.Translation,
115
117
  user_entity_1.User,
116
118
  userDevice_entity_1.UserDevice,
117
119
  category_entity_1.Category,
@@ -122,6 +124,8 @@ function getDbModels() {
122
124
  product_media_entity_1.ProductMedia,
123
125
  product_variant_entity_1.ProductVariant,
124
126
  product_variant_option_entity_1.ProductVariantOption,
127
+ tag_entity_1.Tag,
128
+ product_tag_entity_1.ProductTag,
125
129
  store_entity_1.Store,
126
130
  product_store_entity_1.ProductStore,
127
131
  inventory_entity_1.Inventory,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/index.ts"],"names":[],"mappings":";;;AAwGA,kCA0CC;AA/ID,8DAAoD;AACpD,sEAA4D;AAC5D,wDAA8C;AAC9C,gEAAqD;AACrD,gEAAqD;AACrD,wDAA8C;AAC9C,oEAA0D;AAC1D,4DAAkD;AAGlD,gEAAsD;AACtD,0DAAgD;AAChD,wEAA6D;AAC7D,4EAAiE;AACjE,8DAAoD;AACpD,0EAA+D;AAC/D,8EAAmE;AACnE,4FAAgF;AAGhF,0DAAgD;AAChD,0EAA+D;AAG/D,kEAAwD;AACxD,8EAAmE;AACnE,8EAAmE;AACnE,4EAAiE;AAGjE,4DAAkD;AAClD,4EAAiE;AACjE,4EAAiE;AACjE,sFAA0E;AAG1E,gGAAsF;AACtF,0GAA+F;AAO/F,0DAAkD;AAAzC,uGAAA,MAAM,OAAA;AACf,4DAAoD;AAA3C,yGAAA,OAAO,OAAA;AAChB,oEAA4D;AAAnD,iHAAA,WAAW,OAAA;AACpB,sDAA8C;AAArC,mGAAA,IAAI,OAAA;AACb,8DAAqD;AAA5C,0GAAA,OAAO,OAAA;AAChB,8DAAqD;AAA5C,0GAAA,OAAO,OAAA;AAChB,sDAA8C;AAArC,mGAAA,IAAI,OAAA;AACb,kEAA0D;AAAjD,+GAAA,UAAU,OAAA;AAGnB,8DAAsD;AAA7C,2GAAA,QAAQ,OAAA;AACjB,wDAAgD;AAAvC,qGAAA,KAAK,OAAA;AACd,sEAA6D;AAApD,kHAAA,WAAW,OAAA;AACpB,0EAAiE;AAAxD,sHAAA,aAAa,OAAA;AACtB,4DAAoD;AAA3C,yGAAA,OAAO,OAAA;AAChB,wEAA0E;AAAjE,oHAAA,YAAY,OAAA;AAAE,iHAAA,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c;QACd,uCAAc;QACd,qCAAa;QAGb,sBAAM;QACN,qCAAa;QACb,qCAAa;QACb,8CAAiB;QAGjB,8BAAU;QACV,uCAAc;KACf,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/index.ts"],"names":[],"mappings":";;;AA2GA,kCA2CC;AAnJD,8DAAoD;AACpD,wDAA8C;AAC9C,gEAAqD;AACrD,gEAAqD;AACrD,wDAA8C;AAC9C,oEAA0D;AAC1D,4DAAkD;AAGlD,gEAAsD;AACtD,0DAAgD;AAChD,wEAA6D;AAC7D,4EAAiE;AACjE,8DAAoD;AACpD,0EAA+D;AAC/D,8EAAmE;AACnE,4FAAgF;AAChF,sDAA4C;AAC5C,sEAA2D;AAG3D,0DAAgD;AAChD,0EAA+D;AAG/D,kEAAwD;AACxD,8EAAmE;AACnE,8EAAmE;AACnE,4EAAiE;AAGjE,4DAAkD;AAClD,4EAAiE;AACjE,4EAAiE;AACjE,sFAA0E;AAG1E,gGAAsF;AACtF,0GAA+F;AAO/F,0DAAkD;AAAzC,uGAAA,MAAM,OAAA;AACf,4DAAoD;AAA3C,yGAAA,OAAO,OAAA;AAChB,sDAA8C;AAArC,mGAAA,IAAI,OAAA;AACb,8DAAqD;AAA5C,0GAAA,OAAO,OAAA;AAChB,8DAAqD;AAA5C,0GAAA,OAAO,OAAA;AAChB,sDAA8C;AAArC,mGAAA,IAAI,OAAA;AACb,kEAA0D;AAAjD,+GAAA,UAAU,OAAA;AAGnB,8DAAsD;AAA7C,2GAAA,QAAQ,OAAA;AACjB,wDAAgD;AAAvC,qGAAA,KAAK,OAAA;AACd,sEAA6D;AAApD,kHAAA,WAAW,OAAA;AACpB,0EAAiE;AAAxD,sHAAA,aAAa,OAAA;AACtB,4DAAoD;AAA3C,yGAAA,OAAO,OAAA;AAChB,wEAA0E;AAAjE,oHAAA,YAAY,OAAA;AAAE,iHAAA,SAAS,OAAA;AAChC,4EAAmE;AAA1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