tt-entities 0.1.6 → 0.1.8
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/.claude/settings.local.json +29 -0
- package/dist/libs/tatayab-entities-library/entities/category.entity.d.ts +2 -0
- package/dist/libs/tatayab-entities-library/entities/category.entity.js +8 -0
- package/dist/libs/tatayab-entities-library/entities/category.entity.js.map +1 -1
- package/dist/libs/tatayab-entities-library/entities/popup-ad-store.entity.d.ts +9 -0
- package/dist/libs/tatayab-entities-library/entities/popup-ad-store.entity.js +40 -0
- package/dist/libs/tatayab-entities-library/entities/popup-ad-store.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/popup-ad.entity.d.ts +37 -0
- package/dist/libs/tatayab-entities-library/entities/popup-ad.entity.js +91 -0
- package/dist/libs/tatayab-entities-library/entities/popup-ad.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/index.d.ts +3 -0
- package/dist/libs/tatayab-entities-library/index.js +15 -2
- package/dist/libs/tatayab-entities-library/index.js.map +1 -1
- package/dist/libs/tatayab-entities-library/utils/enums/categoryListingType.d.ts +5 -0
- package/dist/libs/tatayab-entities-library/utils/enums/categoryListingType.js +10 -0
- package/dist/libs/tatayab-entities-library/utils/enums/categoryListingType.js.map +1 -0
- package/libs/tatayab-entities-library/src/entities/category.entity.ts +7 -0
- package/libs/tatayab-entities-library/src/entities/popup-ad-store.entity.ts +17 -0
- package/libs/tatayab-entities-library/src/entities/popup-ad.entity.ts +74 -0
- package/libs/tatayab-entities-library/src/index.ts +14 -0
- package/libs/tatayab-entities-library/src/utils/enums/categoryListingType.ts +5 -0
- package/package.json +1 -1
- package/src/database/migrations/20260704100000-create-password-reset-otps.ts.js +2 -2
- package/src/database/migrations/20260707120000-add-listing-type-to-categories.js +16 -0
- package/src/database/migrations/20260708100000-create-popup-ads.js +40 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(find /Users/hosam/Documents/TatayabNewEra/Backend/tatayab-backend-user/src -type f -name \"*.ts\" | grep -iE \"\\(gift|wrap|product\\)\" | head -20)",
|
|
5
|
+
"Bash(find /Users/hosam/Documents/TatayabNewEra -name \"package.json\" -maxdepth 4 -not -path \"*/node_modules/*\" | xargs grep -l \"tatayab-database-all\\\\|tt-entities\\\\|tatayab-db\" 2>/dev/null)",
|
|
6
|
+
"Bash(npm run *)",
|
|
7
|
+
"Bash(npm install *)",
|
|
8
|
+
"Bash(chmod -R u+rwX /Users/hosam/Documents/TatayabNewEra/Backend/tatayab-backend-user/node_modules/tt-entities)",
|
|
9
|
+
"Bash(rm -rf /Users/hosam/Documents/TatayabNewEra/Backend/tatayab-backend-user/node_modules/tt-entities)",
|
|
10
|
+
"Bash(curl -s -H \"X-API-Key: PMAK-6a4d14e8ef7e880001a1ac00-580a5446eaec7817c7b9f1ebc43edac421\" \"https://api.getpostman.com/workspaces\")",
|
|
11
|
+
"Bash(python3 -m json.tool)",
|
|
12
|
+
"Bash(curl -s -H \"X-API-Key: PMAK-6a4d14e8ef7e880001a1ac00-580a5446eaec7817c7b9f1ebc43edac421\" \"https://api.getpostman.com/collections?workspace=bb316900-6f8a-460e-8308-d42bd6118f35\")",
|
|
13
|
+
"Bash(curl -s -H \"X-API-Key: PMAK-6a4d14e8ef7e880001a1ac00-580a5446eaec7817c7b9f1ebc43edac421\" \"https://api.getpostman.com/collections/55461900-4dbf9438-685b-45e2-992b-61c0bf18e4fd\")",
|
|
14
|
+
"Bash(python3 -c ' *)",
|
|
15
|
+
"Read(//tmp/**)",
|
|
16
|
+
"Bash(curl -s -X PUT -H 'X-API-Key: PMAK-6a4d14e8ef7e880001a1ac00-580a5446eaec7817c7b9f1ebc43edac421' -H 'Content-Type: application/json' -d @/tmp/tatayab_collection_updated.json https://api.getpostman.com/collections/55461900-4dbf9438-685b-45e2-992b-61c0bf18e4fd)",
|
|
17
|
+
"Bash(git -C /Users/hosam/Documents/TatayabNewEra/Backend/tatayab-backend-user log --oneline -5)",
|
|
18
|
+
"Bash(git -C /Users/hosam/Documents/TatayabNewEra/Backend/tatayab-backend-user add src/modules/gift-wrap/gift-wrap.service.ts src/modules/gift-wrap/gift-wrap.module.ts)",
|
|
19
|
+
"Bash(git -C /Users/hosam/Documents/TatayabNewEra/Backend/tatayab-backend-user commit -m ' *)",
|
|
20
|
+
"Bash(git -C /Users/hosam/Documents/TatayabNewEra/Backend/tatayab-backend-user branch)",
|
|
21
|
+
"Bash(git -C /Users/hosam/Documents/TatayabNewEra/Backend/tatayab-backend-user stash list)",
|
|
22
|
+
"Bash(git -C /Users/hosam/Documents/TatayabNewEra/Backend/tatayab-backend-user checkout main)",
|
|
23
|
+
"Bash(git -C /Users/hosam/Documents/TatayabNewEra/Backend/tatayab-backend-user diff src/modules/cart/cart-recovery.service.ts)",
|
|
24
|
+
"Bash(git -C /Users/hosam/Documents/TatayabNewEra/Backend/tatayab-backend-user add src/modules/cart/cart-recovery.service.ts)",
|
|
25
|
+
"Bash(git -C /Users/hosam/Documents/TatayabNewEra/Backend/tatayab-backend-user cherry-pick b59cf95)",
|
|
26
|
+
"Bash(python3 -c \"import json,sys; d=json.load\\(sys.stdin\\); print\\(d['version']\\)\")"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Model } from 'sequelize-typescript';
|
|
2
2
|
import { Status } from '../utils/enums/status';
|
|
3
|
+
import { CategoryListingType } from '../utils/enums/categoryListingType';
|
|
3
4
|
export declare class Category extends Model {
|
|
4
5
|
nameEn: string;
|
|
5
6
|
nameAr: string;
|
|
@@ -8,6 +9,7 @@ export declare class Category extends Model {
|
|
|
8
9
|
image?: string;
|
|
9
10
|
sortOrder: number;
|
|
10
11
|
status: Status;
|
|
12
|
+
listingType: CategoryListingType;
|
|
11
13
|
parentId?: number;
|
|
12
14
|
parent?: Category;
|
|
13
15
|
children?: Category[];
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.Category = void 0;
|
|
13
13
|
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
14
|
const status_1 = require("../utils/enums/status");
|
|
15
|
+
const categoryListingType_1 = require("../utils/enums/categoryListingType");
|
|
15
16
|
let Category = class Category extends sequelize_typescript_1.Model {
|
|
16
17
|
};
|
|
17
18
|
exports.Category = Category;
|
|
@@ -46,6 +47,13 @@ __decorate([
|
|
|
46
47
|
}),
|
|
47
48
|
__metadata("design:type", String)
|
|
48
49
|
], Category.prototype, "status", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, sequelize_typescript_1.Column)({
|
|
52
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(categoryListingType_1.CategoryListingType)),
|
|
53
|
+
defaultValue: categoryListingType_1.CategoryListingType.SELL_ONLY,
|
|
54
|
+
}),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], Category.prototype, "listingType", void 0);
|
|
49
57
|
__decorate([
|
|
50
58
|
(0, sequelize_typescript_1.ForeignKey)(() => Category),
|
|
51
59
|
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/category.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAQ8B;AAC9B,kDAA+C;
|
|
1
|
+
{"version":3,"file":"category.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/category.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAQ8B;AAC9B,kDAA+C;AAC/C,4EAAyE;AAGlE,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,4BAAK;CAwClC,CAAA;AAxCY,4BAAQ;AAEX;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;wCACN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AvCnB,QAAQ;IADpB,4BAAK;GACO,QAAQ,CAwCpB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { PopupAd } from './popup-ad.entity';
|
|
3
|
+
import { Store } from './store.entity';
|
|
4
|
+
export declare class PopupAdStore extends Model {
|
|
5
|
+
popupAdId: number;
|
|
6
|
+
storeId: number;
|
|
7
|
+
popupAd: PopupAd;
|
|
8
|
+
store: Store;
|
|
9
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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.PopupAdStore = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const popup_ad_entity_1 = require("./popup-ad.entity");
|
|
15
|
+
const store_entity_1 = require("./store.entity");
|
|
16
|
+
let PopupAdStore = class PopupAdStore extends sequelize_typescript_1.Model {
|
|
17
|
+
};
|
|
18
|
+
exports.PopupAdStore = PopupAdStore;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, sequelize_typescript_1.ForeignKey)(() => popup_ad_entity_1.PopupAd),
|
|
21
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
22
|
+
__metadata("design:type", Number)
|
|
23
|
+
], PopupAdStore.prototype, "popupAdId", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, sequelize_typescript_1.ForeignKey)(() => store_entity_1.Store),
|
|
26
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], PopupAdStore.prototype, "storeId", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, sequelize_typescript_1.BelongsTo)(() => popup_ad_entity_1.PopupAd),
|
|
31
|
+
__metadata("design:type", popup_ad_entity_1.PopupAd)
|
|
32
|
+
], PopupAdStore.prototype, "popupAd", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, sequelize_typescript_1.BelongsTo)(() => store_entity_1.Store),
|
|
35
|
+
__metadata("design:type", store_entity_1.Store)
|
|
36
|
+
], PopupAdStore.prototype, "store", void 0);
|
|
37
|
+
exports.PopupAdStore = PopupAdStore = __decorate([
|
|
38
|
+
sequelize_typescript_1.Table
|
|
39
|
+
], PopupAdStore);
|
|
40
|
+
//# sourceMappingURL=popup-ad-store.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popup-ad-store.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/popup-ad-store.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAAmF;AACnF,uDAA4C;AAC5C,iDAAuC;AAGhC,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,4BAAK;CAWtC,CAAA;AAXY,oCAAY;AAGf;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,yBAAO,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;AAEU;IAAjC,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,yBAAO,CAAC;8BAAkB,yBAAO;6CAAC;AACjB;IAAjC,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,oBAAK,CAAC;8BAAkB,oBAAK;2CAAC;uBAVpC,YAAY;IADxB,4BAAK;GACO,YAAY,CAWxB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { PopupAdStore } from './popup-ad-store.entity';
|
|
3
|
+
export declare enum PopupAdType {
|
|
4
|
+
CATALOG = "catalog",
|
|
5
|
+
PRODUCT_LIST = "product_list",
|
|
6
|
+
PRODUCT_DETAIL = "product_detail",
|
|
7
|
+
BUNDLE_DETAIL = "bundle_detail",
|
|
8
|
+
BANNER = "banner",
|
|
9
|
+
EXTERNAL_URL = "external_url"
|
|
10
|
+
}
|
|
11
|
+
export declare enum PopupAdStatus {
|
|
12
|
+
ACTIVE = "active",
|
|
13
|
+
INACTIVE = "inactive",
|
|
14
|
+
DRAFT = "draft"
|
|
15
|
+
}
|
|
16
|
+
export interface PopupAdRefIds {
|
|
17
|
+
categoryIds?: number[];
|
|
18
|
+
brandIds?: number[];
|
|
19
|
+
skus?: string[];
|
|
20
|
+
productId?: number;
|
|
21
|
+
bundleId?: number;
|
|
22
|
+
bannerId?: number;
|
|
23
|
+
}
|
|
24
|
+
export declare class PopupAd extends Model {
|
|
25
|
+
nameEn: string;
|
|
26
|
+
nameAr: string;
|
|
27
|
+
image: string;
|
|
28
|
+
type: PopupAdType;
|
|
29
|
+
refIds: PopupAdRefIds;
|
|
30
|
+
ctaUrl: string | null;
|
|
31
|
+
weight: number;
|
|
32
|
+
startDate: Date | null;
|
|
33
|
+
endDate: Date | null;
|
|
34
|
+
status: PopupAdStatus;
|
|
35
|
+
sortOrder: number;
|
|
36
|
+
stores: PopupAdStore[];
|
|
37
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
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.PopupAd = exports.PopupAdStatus = exports.PopupAdType = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const popup_ad_store_entity_1 = require("./popup-ad-store.entity");
|
|
15
|
+
var PopupAdType;
|
|
16
|
+
(function (PopupAdType) {
|
|
17
|
+
PopupAdType["CATALOG"] = "catalog";
|
|
18
|
+
PopupAdType["PRODUCT_LIST"] = "product_list";
|
|
19
|
+
PopupAdType["PRODUCT_DETAIL"] = "product_detail";
|
|
20
|
+
PopupAdType["BUNDLE_DETAIL"] = "bundle_detail";
|
|
21
|
+
PopupAdType["BANNER"] = "banner";
|
|
22
|
+
PopupAdType["EXTERNAL_URL"] = "external_url";
|
|
23
|
+
})(PopupAdType || (exports.PopupAdType = PopupAdType = {}));
|
|
24
|
+
var PopupAdStatus;
|
|
25
|
+
(function (PopupAdStatus) {
|
|
26
|
+
PopupAdStatus["ACTIVE"] = "active";
|
|
27
|
+
PopupAdStatus["INACTIVE"] = "inactive";
|
|
28
|
+
PopupAdStatus["DRAFT"] = "draft";
|
|
29
|
+
})(PopupAdStatus || (exports.PopupAdStatus = PopupAdStatus = {}));
|
|
30
|
+
let PopupAd = class PopupAd extends sequelize_typescript_1.Model {
|
|
31
|
+
};
|
|
32
|
+
exports.PopupAd = PopupAd;
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], PopupAd.prototype, "nameEn", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], PopupAd.prototype, "nameAr", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], PopupAd.prototype, "image", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, sequelize_typescript_1.Column)({
|
|
47
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(PopupAdType)),
|
|
48
|
+
allowNull: false,
|
|
49
|
+
}),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], PopupAd.prototype, "type", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.JSON, allowNull: false, defaultValue: {} }),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], PopupAd.prototype, "refIds", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.STRING(1000), allowNull: true }),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], PopupAd.prototype, "ctaUrl", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.INTEGER, allowNull: false, defaultValue: 10 }),
|
|
62
|
+
__metadata("design:type", Number)
|
|
63
|
+
], PopupAd.prototype, "weight", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DATE, allowNull: true }),
|
|
66
|
+
__metadata("design:type", Date)
|
|
67
|
+
], PopupAd.prototype, "startDate", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DATE, allowNull: true }),
|
|
70
|
+
__metadata("design:type", Date)
|
|
71
|
+
], PopupAd.prototype, "endDate", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, sequelize_typescript_1.Column)({
|
|
74
|
+
type: sequelize_typescript_1.DataType.ENUM(...Object.values(PopupAdStatus)),
|
|
75
|
+
allowNull: false,
|
|
76
|
+
defaultValue: PopupAdStatus.DRAFT,
|
|
77
|
+
}),
|
|
78
|
+
__metadata("design:type", String)
|
|
79
|
+
], PopupAd.prototype, "status", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, defaultValue: 0 }),
|
|
82
|
+
__metadata("design:type", Number)
|
|
83
|
+
], PopupAd.prototype, "sortOrder", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, sequelize_typescript_1.HasMany)(() => popup_ad_store_entity_1.PopupAdStore),
|
|
86
|
+
__metadata("design:type", Array)
|
|
87
|
+
], PopupAd.prototype, "stores", void 0);
|
|
88
|
+
exports.PopupAd = PopupAd = __decorate([
|
|
89
|
+
sequelize_typescript_1.Table
|
|
90
|
+
], PopupAd);
|
|
91
|
+
//# sourceMappingURL=popup-ad.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popup-ad.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/popup-ad.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAE8B;AAC9B,mEAAuD;AAEvD,IAAY,WAOX;AAPD,WAAY,WAAW;IAC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E,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;8BAC9B,IAAI;0CAAQ;AAGvB;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;8BAChC,IAAI;wCAAQ;AAOrB;IALP,IAAA,6BAAM,EAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QACpD,SAAS,EAAE,KAAK;QAChB,YAAY,EAAE,aAAa,CAAC,KAAK;KAClC,CAAC;;uCAC4B;AAGtB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;0CACpB;AAGlB;IADP,IAAA,8BAAO,EAAC,GAAG,EAAE,CAAC,oCAAY,CAAC;;uCACG;kBA1CpB,OAAO;IADnB,4BAAK;GACO,OAAO,CA2CnB"}
|
|
@@ -11,12 +11,15 @@ export { UserFavorite } from './entities/user-favorite.entity';
|
|
|
11
11
|
export { UserFavoriteCatalog, FavoriteCatalogItemType, } from './entities/user-favorite-catalog.entity';
|
|
12
12
|
export { Banner, BannerPlacement, BannerStatus, BannerFilters, } from './entities/banner.entity';
|
|
13
13
|
export { AppConfig } from './entities/app-config.entity';
|
|
14
|
+
export { PopupAd, PopupAdType, PopupAdStatus, PopupAdRefIds, } from './entities/popup-ad.entity';
|
|
15
|
+
export { PopupAdStore } from './entities/popup-ad-store.entity';
|
|
14
16
|
export { RunSheet, RunSheetStatus } from './entities/run-sheet.entity';
|
|
15
17
|
export { RunSheetOrder, RunSheetOrderStatus, } from './entities/run-sheet-order.entity';
|
|
16
18
|
export { Refund, RefundMethod, RefundStatus } from './entities/refund.entity';
|
|
17
19
|
export { UserWalletBalance } from './entities/user-wallet-balance.entity';
|
|
18
20
|
export { PasswordResetOtp } from './entities/PasswordResetOtp';
|
|
19
21
|
export { Category } from './entities/category.entity';
|
|
22
|
+
export { CategoryListingType } from './utils/enums/categoryListingType';
|
|
20
23
|
export { Brand } from './entities/brand.entity';
|
|
21
24
|
export { VariantType } from './entities/variant-type.entity';
|
|
22
25
|
export { VariantOption } from './entities/variant-option.entity';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
3
|
+
exports.ShippingRule = exports.StockMovement = exports.InventoryStock = exports.StoreInventory = exports.Inventory = exports.ProductStore = exports.Store = exports.BundleStore = exports.BundleProduct = exports.Bundle = exports.ProductTag = exports.Tag = exports.ProductVariantOption = exports.ProductVariant = exports.MediaType = exports.ProductMedia = exports.Product = exports.VariantOption = exports.VariantType = exports.Brand = exports.CategoryListingType = exports.Category = exports.PasswordResetOtp = exports.UserWalletBalance = exports.RefundStatus = exports.RefundMethod = exports.Refund = exports.RunSheetOrderStatus = exports.RunSheetOrder = exports.RunSheetStatus = exports.RunSheet = exports.PopupAdStore = exports.PopupAdStatus = exports.PopupAdType = exports.PopupAd = exports.AppConfig = exports.BannerStatus = exports.BannerPlacement = exports.Banner = exports.FavoriteCatalogItemType = exports.UserFavoriteCatalog = exports.UserFavorite = exports.UserAddress = exports.UserDevice = exports.User = exports.SysUser = exports.SysRole = exports.Area = exports.Country = exports.ApiKey = void 0;
|
|
4
|
+
exports.VersionType = exports.ProductApp = exports.OsName = exports.MarketingFeed = exports.OrderEditItem = exports.OrderEditSession = exports.OrderPaymentType = exports.OrderPaymentStatus = exports.OrderPayment = exports.OrderEditScenario = exports.OrderItemChangeLog = exports.PurchaseOrderReceiptItem = exports.PurchaseOrderReceipt = exports.PurchaseOrderOrderItem = exports.TransactionCategory = exports.TransactionType = exports.UserTransaction = exports.OrderStatusHistory = exports.OrderItemBundleSelection = exports.OrderItemFulfillmentStatus = exports.OrderItemType = exports.OrderItem = exports.Order = exports.OrderStatusCode = exports.OrderStatus = exports.CouponUser = exports.CouponProduct = exports.CouponStore = exports.CouponOsTarget = exports.CouponAppliesTo = exports.CouponDiscountType = exports.Coupon = exports.CartItemBundleSelection = exports.CartItemType = exports.CartItem = exports.CartStatus = exports.Cart = exports.StorePaymentMethod = exports.PaymentMethodCountry = exports.PaymentMethodType = exports.PaymentMethod = exports.PaymentGatewayType = exports.PaymentGateway = exports.RolePermission = exports.Permission = exports.PurchaseOrderItemStatus = exports.PurchaseOrderItem = exports.PurchaseOrder = exports.VendorProduct = exports.Vendor = void 0;
|
|
5
|
+
exports.StockMovementType = exports.PurchaseOrderStatus = exports.Gender = exports.Status = exports.Language = void 0;
|
|
5
6
|
exports.getDbModels = getDbModels;
|
|
6
7
|
const country_entity_1 = require("./entities/country.entity");
|
|
7
8
|
const area_entity_1 = require("./entities/area.entity");
|
|
@@ -15,6 +16,8 @@ const user_favorite_entity_1 = require("./entities/user-favorite.entity");
|
|
|
15
16
|
const user_favorite_catalog_entity_1 = require("./entities/user-favorite-catalog.entity");
|
|
16
17
|
const banner_entity_1 = require("./entities/banner.entity");
|
|
17
18
|
const app_config_entity_1 = require("./entities/app-config.entity");
|
|
19
|
+
const popup_ad_entity_1 = require("./entities/popup-ad.entity");
|
|
20
|
+
const popup_ad_store_entity_1 = require("./entities/popup-ad-store.entity");
|
|
18
21
|
const category_entity_1 = require("./entities/category.entity");
|
|
19
22
|
const brand_entity_1 = require("./entities/brand.entity");
|
|
20
23
|
const variant_type_entity_1 = require("./entities/variant-type.entity");
|
|
@@ -98,6 +101,12 @@ Object.defineProperty(exports, "BannerPlacement", { enumerable: true, get: funct
|
|
|
98
101
|
Object.defineProperty(exports, "BannerStatus", { enumerable: true, get: function () { return banner_entity_2.BannerStatus; } });
|
|
99
102
|
var app_config_entity_2 = require("./entities/app-config.entity");
|
|
100
103
|
Object.defineProperty(exports, "AppConfig", { enumerable: true, get: function () { return app_config_entity_2.AppConfig; } });
|
|
104
|
+
var popup_ad_entity_2 = require("./entities/popup-ad.entity");
|
|
105
|
+
Object.defineProperty(exports, "PopupAd", { enumerable: true, get: function () { return popup_ad_entity_2.PopupAd; } });
|
|
106
|
+
Object.defineProperty(exports, "PopupAdType", { enumerable: true, get: function () { return popup_ad_entity_2.PopupAdType; } });
|
|
107
|
+
Object.defineProperty(exports, "PopupAdStatus", { enumerable: true, get: function () { return popup_ad_entity_2.PopupAdStatus; } });
|
|
108
|
+
var popup_ad_store_entity_2 = require("./entities/popup-ad-store.entity");
|
|
109
|
+
Object.defineProperty(exports, "PopupAdStore", { enumerable: true, get: function () { return popup_ad_store_entity_2.PopupAdStore; } });
|
|
101
110
|
var run_sheet_entity_2 = require("./entities/run-sheet.entity");
|
|
102
111
|
Object.defineProperty(exports, "RunSheet", { enumerable: true, get: function () { return run_sheet_entity_2.RunSheet; } });
|
|
103
112
|
Object.defineProperty(exports, "RunSheetStatus", { enumerable: true, get: function () { return run_sheet_entity_2.RunSheetStatus; } });
|
|
@@ -114,6 +123,8 @@ var PasswordResetOtp_2 = require("./entities/PasswordResetOtp");
|
|
|
114
123
|
Object.defineProperty(exports, "PasswordResetOtp", { enumerable: true, get: function () { return PasswordResetOtp_2.PasswordResetOtp; } });
|
|
115
124
|
var category_entity_2 = require("./entities/category.entity");
|
|
116
125
|
Object.defineProperty(exports, "Category", { enumerable: true, get: function () { return category_entity_2.Category; } });
|
|
126
|
+
var categoryListingType_1 = require("./utils/enums/categoryListingType");
|
|
127
|
+
Object.defineProperty(exports, "CategoryListingType", { enumerable: true, get: function () { return categoryListingType_1.CategoryListingType; } });
|
|
117
128
|
var brand_entity_2 = require("./entities/brand.entity");
|
|
118
129
|
Object.defineProperty(exports, "Brand", { enumerable: true, get: function () { return brand_entity_2.Brand; } });
|
|
119
130
|
var variant_type_entity_2 = require("./entities/variant-type.entity");
|
|
@@ -317,6 +328,8 @@ function getDbModels() {
|
|
|
317
328
|
order_edit_item_entity_1.OrderEditItem,
|
|
318
329
|
marketing_feed_entity_1.MarketingFeed,
|
|
319
330
|
PasswordResetOtp_1.PasswordResetOtp,
|
|
331
|
+
popup_ad_entity_1.PopupAd,
|
|
332
|
+
popup_ad_store_entity_1.PopupAdStore,
|
|
320
333
|
];
|
|
321
334
|
}
|
|
322
335
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../libs/tatayab-entities-library/src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../libs/tatayab-entities-library/src/index.ts"],"names":[],"mappings":";;;;;AA6PA,kCAqGC;AA/VD,8DAAoD;AACpD,wDAA8C;AAC9C,gEAAqD;AACrD,gEAAqD;AACrD,wDAA8C;AAC9C,oEAA0D;AAC1D,4DAAkD;AAClD,wEAA6D;AAC7D,0EAA+D;AAC/D,0FAA8E;AAC9E,4DAAkD;AAClD,oEAAyD;AACzD,gEAAqD;AACrD,4EAAgE;AAGhE,gEAAsD;AACtD,0DAAgD;AAChD,wEAA6D;AAC7D,4EAAiE;AACjE,8DAAoD;AACpD,0EAA+D;AAC/D,8EAAmE;AACnE,4FAAgF;AAChF,sDAA4C;AAC5C,sEAA2D;AAC3D,4DAAkD;AAClD,4EAAiE;AACjE,wEAA6D;AAG7D,0DAAgD;AAChD,0EAA+D;AAG/D,kEAAwD;AACxD,8EAAmE;AACnE,8EAAmE;AACnE,4EAAiE;AACjE,0EAA+D;AAG/D,4DAAkD;AAClD,4EAAiE;AACjE,4EAAiE;AACjE,sFAA0E;AAG1E,oEAA0D;AAC1D,8EAAmE;AAGnE,8EAAmE;AACnE,4EAAiE;AACjE,4FAAgF;AAChF,wFAA4E;AAG5E,wDAA8C;AAC9C,kEAAuD;AACvD,oGAAuF;AAGvF,4DAAkD;AAClD,wEAA6D;AAC7D,4EAAiE;AACjE,sEAA2D;AAG3D,wEAA6D;AAC7D,0DAAgD;AAChD,oEAAyD;AACzD,sGAAyF;AACzF,wFAA4E;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QAET,2BAAQ;QACR,sCAAa;QAEb,sBAAM;QACN,oDAAoB;QACpB,6DAAwB;QAExB,iDAAkB;QAClB,mCAAY;QACZ,4CAAgB;QAChB,sCAAa;QAEb,qCAAa;QACb,mCAAgB;QAGhB,yBAAO;QACP,oCAAY;KACb,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CategoryListingType = void 0;
|
|
4
|
+
var CategoryListingType;
|
|
5
|
+
(function (CategoryListingType) {
|
|
6
|
+
CategoryListingType["SELL_ONLY"] = "sell_only";
|
|
7
|
+
CategoryListingType["GIFT_ONLY"] = "gift_only";
|
|
8
|
+
CategoryListingType["BOTH"] = "both";
|
|
9
|
+
})(CategoryListingType || (exports.CategoryListingType = CategoryListingType = {}));
|
|
10
|
+
//# sourceMappingURL=categoryListingType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"categoryListingType.js","sourceRoot":"","sources":["../../../../../libs/tatayab-entities-library/src/utils/enums/categoryListingType.ts"],"names":[],"mappings":";;;AAAA,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,8CAAuB,CAAA;IACvB,8CAAuB,CAAA;IACvB,oCAAa,CAAA;AACf,CAAC,EAJW,mBAAmB,mCAAnB,mBAAmB,QAI9B"}
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
HasMany,
|
|
9
9
|
} from 'sequelize-typescript';
|
|
10
10
|
import { Status } from '../utils/enums/status';
|
|
11
|
+
import { CategoryListingType } from '../utils/enums/categoryListingType';
|
|
11
12
|
|
|
12
13
|
@Table
|
|
13
14
|
export class Category extends Model {
|
|
@@ -35,6 +36,12 @@ export class Category extends Model {
|
|
|
35
36
|
})
|
|
36
37
|
declare status: Status;
|
|
37
38
|
|
|
39
|
+
@Column({
|
|
40
|
+
type: DataType.ENUM(...Object.values(CategoryListingType)),
|
|
41
|
+
defaultValue: CategoryListingType.SELL_ONLY,
|
|
42
|
+
})
|
|
43
|
+
declare listingType: CategoryListingType;
|
|
44
|
+
|
|
38
45
|
@ForeignKey(() => Category)
|
|
39
46
|
@Column({ allowNull: true })
|
|
40
47
|
declare parentId?: number;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Table, Column, Model, ForeignKey, BelongsTo } from 'sequelize-typescript';
|
|
2
|
+
import { PopupAd } from './popup-ad.entity';
|
|
3
|
+
import { Store } from './store.entity';
|
|
4
|
+
|
|
5
|
+
@Table
|
|
6
|
+
export class PopupAdStore extends Model {
|
|
7
|
+
@ForeignKey(() => PopupAd)
|
|
8
|
+
@Column({ allowNull: false })
|
|
9
|
+
declare popupAdId: number;
|
|
10
|
+
|
|
11
|
+
@ForeignKey(() => Store)
|
|
12
|
+
@Column({ allowNull: false })
|
|
13
|
+
declare storeId: number;
|
|
14
|
+
|
|
15
|
+
@BelongsTo(() => PopupAd) declare popupAd: PopupAd;
|
|
16
|
+
@BelongsTo(() => Store) declare store: Store;
|
|
17
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Table, Column, Model, DataType, HasMany,
|
|
3
|
+
} from 'sequelize-typescript';
|
|
4
|
+
import { PopupAdStore } from './popup-ad-store.entity';
|
|
5
|
+
|
|
6
|
+
export enum PopupAdType {
|
|
7
|
+
CATALOG = 'catalog',
|
|
8
|
+
PRODUCT_LIST = 'product_list',
|
|
9
|
+
PRODUCT_DETAIL = 'product_detail',
|
|
10
|
+
BUNDLE_DETAIL = 'bundle_detail',
|
|
11
|
+
BANNER = 'banner',
|
|
12
|
+
EXTERNAL_URL = 'external_url',
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export enum PopupAdStatus {
|
|
16
|
+
ACTIVE = 'active',
|
|
17
|
+
INACTIVE = 'inactive',
|
|
18
|
+
DRAFT = 'draft',
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface PopupAdRefIds {
|
|
22
|
+
categoryIds?: number[];
|
|
23
|
+
brandIds?: number[];
|
|
24
|
+
skus?: string[];
|
|
25
|
+
productId?: number;
|
|
26
|
+
bundleId?: number;
|
|
27
|
+
bannerId?: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@Table
|
|
31
|
+
export class PopupAd extends Model {
|
|
32
|
+
@Column({ allowNull: false })
|
|
33
|
+
declare nameEn: string;
|
|
34
|
+
|
|
35
|
+
@Column({ allowNull: false })
|
|
36
|
+
declare nameAr: string;
|
|
37
|
+
|
|
38
|
+
@Column({ allowNull: false })
|
|
39
|
+
declare image: string;
|
|
40
|
+
|
|
41
|
+
@Column({
|
|
42
|
+
type: DataType.ENUM(...Object.values(PopupAdType)),
|
|
43
|
+
allowNull: false,
|
|
44
|
+
})
|
|
45
|
+
declare type: PopupAdType;
|
|
46
|
+
|
|
47
|
+
@Column({ type: DataType.JSON, allowNull: false, defaultValue: {} })
|
|
48
|
+
declare refIds: PopupAdRefIds;
|
|
49
|
+
|
|
50
|
+
@Column({ type: DataType.STRING(1000), allowNull: true })
|
|
51
|
+
declare ctaUrl: string | null;
|
|
52
|
+
|
|
53
|
+
@Column({ type: DataType.INTEGER, allowNull: false, defaultValue: 10 })
|
|
54
|
+
declare weight: number;
|
|
55
|
+
|
|
56
|
+
@Column({ type: DataType.DATE, allowNull: true })
|
|
57
|
+
declare startDate: Date | null;
|
|
58
|
+
|
|
59
|
+
@Column({ type: DataType.DATE, allowNull: true })
|
|
60
|
+
declare endDate: Date | null;
|
|
61
|
+
|
|
62
|
+
@Column({
|
|
63
|
+
type: DataType.ENUM(...Object.values(PopupAdStatus)),
|
|
64
|
+
allowNull: false,
|
|
65
|
+
defaultValue: PopupAdStatus.DRAFT,
|
|
66
|
+
})
|
|
67
|
+
declare status: PopupAdStatus;
|
|
68
|
+
|
|
69
|
+
@Column({ allowNull: false, defaultValue: 0 })
|
|
70
|
+
declare sortOrder: number;
|
|
71
|
+
|
|
72
|
+
@HasMany(() => PopupAdStore)
|
|
73
|
+
declare stores: PopupAdStore[];
|
|
74
|
+
}
|
|
@@ -13,6 +13,8 @@ import { UserFavorite } from './entities/user-favorite.entity';
|
|
|
13
13
|
import { UserFavoriteCatalog } from './entities/user-favorite-catalog.entity';
|
|
14
14
|
import { Banner } from './entities/banner.entity';
|
|
15
15
|
import { AppConfig } from './entities/app-config.entity';
|
|
16
|
+
import { PopupAd } from './entities/popup-ad.entity';
|
|
17
|
+
import { PopupAdStore } from './entities/popup-ad-store.entity';
|
|
16
18
|
|
|
17
19
|
// ─── Catalogue ────────────────────────────────────────────────────────────────
|
|
18
20
|
import { Category } from './entities/category.entity';
|
|
@@ -113,6 +115,13 @@ export {
|
|
|
113
115
|
BannerFilters,
|
|
114
116
|
} from './entities/banner.entity';
|
|
115
117
|
export { AppConfig } from './entities/app-config.entity';
|
|
118
|
+
export {
|
|
119
|
+
PopupAd,
|
|
120
|
+
PopupAdType,
|
|
121
|
+
PopupAdStatus,
|
|
122
|
+
PopupAdRefIds,
|
|
123
|
+
} from './entities/popup-ad.entity';
|
|
124
|
+
export { PopupAdStore } from './entities/popup-ad-store.entity';
|
|
116
125
|
export { RunSheet, RunSheetStatus } from './entities/run-sheet.entity';
|
|
117
126
|
export {
|
|
118
127
|
RunSheetOrder,
|
|
@@ -125,6 +134,7 @@ export { PasswordResetOtp } from './entities/PasswordResetOtp';
|
|
|
125
134
|
|
|
126
135
|
// ─── Catalogue ────────────────────────────────────────────────────────────────
|
|
127
136
|
export { Category } from './entities/category.entity';
|
|
137
|
+
export { CategoryListingType } from './utils/enums/categoryListingType';
|
|
128
138
|
export { Brand } from './entities/brand.entity';
|
|
129
139
|
export { VariantType } from './entities/variant-type.entity';
|
|
130
140
|
export { VariantOption } from './entities/variant-option.entity';
|
|
@@ -337,5 +347,9 @@ export function getDbModels(): ModelCtor[] {
|
|
|
337
347
|
|
|
338
348
|
MarketingFeed,
|
|
339
349
|
PasswordResetOtp,
|
|
350
|
+
|
|
351
|
+
// Popup Ads
|
|
352
|
+
PopupAd,
|
|
353
|
+
PopupAdStore,
|
|
340
354
|
];
|
|
341
355
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
up: async (queryInterface, Sequelize) => {
|
|
5
|
+
await queryInterface.addColumn('Categories', 'listingType', {
|
|
6
|
+
type: Sequelize.ENUM('sell_only', 'gift_only', 'both'),
|
|
7
|
+
allowNull: false,
|
|
8
|
+
defaultValue: 'sell_only',
|
|
9
|
+
after: 'status',
|
|
10
|
+
});
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
down: async (queryInterface) => {
|
|
14
|
+
await queryInterface.removeColumn('Categories', 'listingType');
|
|
15
|
+
},
|
|
16
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
up: async (queryInterface, Sequelize) => {
|
|
5
|
+
await queryInterface.createTable('PopupAds', {
|
|
6
|
+
id: { type: Sequelize.INTEGER, autoIncrement: true, primaryKey: true },
|
|
7
|
+
nameEn: { type: Sequelize.STRING, allowNull: false },
|
|
8
|
+
nameAr: { type: Sequelize.STRING, allowNull: false },
|
|
9
|
+
image: { type: Sequelize.STRING, allowNull: false },
|
|
10
|
+
type: { type: Sequelize.ENUM('catalog','product_list','product_detail','bundle_detail','banner','external_url'), allowNull: false },
|
|
11
|
+
refIds: { type: Sequelize.JSON, allowNull: false, defaultValue: '{}' },
|
|
12
|
+
ctaUrl: { type: Sequelize.STRING(1000), allowNull: true },
|
|
13
|
+
weight: { type: Sequelize.INTEGER, allowNull: false, defaultValue: 10 },
|
|
14
|
+
startDate: { type: Sequelize.DATE, allowNull: true },
|
|
15
|
+
endDate: { type: Sequelize.DATE, allowNull: true },
|
|
16
|
+
status: { type: Sequelize.ENUM('active','inactive','draft'), allowNull: false, defaultValue: 'draft' },
|
|
17
|
+
sortOrder: { type: Sequelize.INTEGER, allowNull: false, defaultValue: 0 },
|
|
18
|
+
createdAt: { type: Sequelize.DATE, allowNull: false },
|
|
19
|
+
updatedAt: { type: Sequelize.DATE, allowNull: false },
|
|
20
|
+
deletedAt: { type: Sequelize.DATE, allowNull: true },
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
await queryInterface.createTable('PopupAdStores', {
|
|
24
|
+
id: { type: Sequelize.INTEGER, autoIncrement: true, primaryKey: true },
|
|
25
|
+
popupAdId: { type: Sequelize.INTEGER, allowNull: false, references: { model: 'PopupAds', key: 'id' }, onDelete: 'CASCADE' },
|
|
26
|
+
storeId: { type: Sequelize.INTEGER, allowNull: false, references: { model: 'Stores', key: 'id' }, onDelete: 'CASCADE' },
|
|
27
|
+
createdAt: { type: Sequelize.DATE, allowNull: false },
|
|
28
|
+
updatedAt: { type: Sequelize.DATE, allowNull: false },
|
|
29
|
+
deletedAt: { type: Sequelize.DATE, allowNull: true },
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
await queryInterface.addIndex('PopupAdStores', ['popupAdId']);
|
|
33
|
+
await queryInterface.addIndex('PopupAdStores', ['storeId']);
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
down: async (queryInterface) => {
|
|
37
|
+
await queryInterface.dropTable('PopupAdStores');
|
|
38
|
+
await queryInterface.dropTable('PopupAds');
|
|
39
|
+
},
|
|
40
|
+
};
|