tt-entities 0.1.0 → 0.1.2

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.
@@ -0,0 +1,29 @@
1
+ import { Model } from 'sequelize-typescript';
2
+ import { Store } from './store.entity';
3
+ export type FeedPlatform = 'meta' | 'google' | 'tiktok' | 'snapchat' | 'other';
4
+ export type FeedOutputFormat = 'csv' | 'tsv' | 'xml';
5
+ export type FeedStatus = 'active' | 'inactive';
6
+ export declare class MarketingFeed extends Model {
7
+ name: string;
8
+ platform: FeedPlatform;
9
+ status: FeedStatus;
10
+ storeId: number;
11
+ store: Store;
12
+ countryIds: number[] | null;
13
+ filterBrandIds: number[] | null;
14
+ filterCategoryIds: number[] | null;
15
+ filterMinPrice: number | null;
16
+ filterMaxPrice: number | null;
17
+ filterMinSalePrice: number | null;
18
+ filterMaxSalePrice: number | null;
19
+ filterOnSaleOnly: boolean;
20
+ filterInStockOnly: boolean;
21
+ filterTagIds: number[] | null;
22
+ filterSkuSearch: string | null;
23
+ outputFormat: FeedOutputFormat;
24
+ storefrontBaseUrl: string | null;
25
+ lastGeneratedAt: Date | null;
26
+ lastRowCount: number | null;
27
+ createdBy: number | null;
28
+ updatedBy: number | null;
29
+ }
@@ -0,0 +1,122 @@
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.MarketingFeed = void 0;
13
+ const sequelize_typescript_1 = require("sequelize-typescript");
14
+ const store_entity_1 = require("./store.entity");
15
+ let MarketingFeed = class MarketingFeed extends sequelize_typescript_1.Model {
16
+ };
17
+ exports.MarketingFeed = MarketingFeed;
18
+ __decorate([
19
+ (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.STRING(255), allowNull: false }),
20
+ __metadata("design:type", String)
21
+ ], MarketingFeed.prototype, "name", void 0);
22
+ __decorate([
23
+ (0, sequelize_typescript_1.Column)({
24
+ type: sequelize_typescript_1.DataType.ENUM('meta', 'google', 'tiktok', 'snapchat', 'other'),
25
+ allowNull: false,
26
+ defaultValue: 'meta',
27
+ }),
28
+ __metadata("design:type", String)
29
+ ], MarketingFeed.prototype, "platform", void 0);
30
+ __decorate([
31
+ (0, sequelize_typescript_1.Column)({
32
+ type: sequelize_typescript_1.DataType.ENUM('active', 'inactive'),
33
+ allowNull: false,
34
+ defaultValue: 'active',
35
+ }),
36
+ __metadata("design:type", String)
37
+ ], MarketingFeed.prototype, "status", void 0);
38
+ __decorate([
39
+ (0, sequelize_typescript_1.ForeignKey)(() => store_entity_1.Store),
40
+ (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.INTEGER, allowNull: false }),
41
+ __metadata("design:type", Number)
42
+ ], MarketingFeed.prototype, "storeId", void 0);
43
+ __decorate([
44
+ (0, sequelize_typescript_1.BelongsTo)(() => store_entity_1.Store),
45
+ __metadata("design:type", store_entity_1.Store)
46
+ ], MarketingFeed.prototype, "store", void 0);
47
+ __decorate([
48
+ (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.JSON, allowNull: true, defaultValue: null }),
49
+ __metadata("design:type", Array)
50
+ ], MarketingFeed.prototype, "countryIds", void 0);
51
+ __decorate([
52
+ (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.JSON, allowNull: true, defaultValue: null }),
53
+ __metadata("design:type", Array)
54
+ ], MarketingFeed.prototype, "filterBrandIds", void 0);
55
+ __decorate([
56
+ (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.JSON, allowNull: true, defaultValue: null }),
57
+ __metadata("design:type", Array)
58
+ ], MarketingFeed.prototype, "filterCategoryIds", void 0);
59
+ __decorate([
60
+ (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: true, defaultValue: null }),
61
+ __metadata("design:type", Number)
62
+ ], MarketingFeed.prototype, "filterMinPrice", void 0);
63
+ __decorate([
64
+ (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: true, defaultValue: null }),
65
+ __metadata("design:type", Number)
66
+ ], MarketingFeed.prototype, "filterMaxPrice", void 0);
67
+ __decorate([
68
+ (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: true, defaultValue: null }),
69
+ __metadata("design:type", Number)
70
+ ], MarketingFeed.prototype, "filterMinSalePrice", void 0);
71
+ __decorate([
72
+ (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: true, defaultValue: null }),
73
+ __metadata("design:type", Number)
74
+ ], MarketingFeed.prototype, "filterMaxSalePrice", void 0);
75
+ __decorate([
76
+ (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.BOOLEAN, allowNull: false, defaultValue: false }),
77
+ __metadata("design:type", Boolean)
78
+ ], MarketingFeed.prototype, "filterOnSaleOnly", void 0);
79
+ __decorate([
80
+ (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.BOOLEAN, allowNull: false, defaultValue: false }),
81
+ __metadata("design:type", Boolean)
82
+ ], MarketingFeed.prototype, "filterInStockOnly", void 0);
83
+ __decorate([
84
+ (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.JSON, allowNull: true, defaultValue: null }),
85
+ __metadata("design:type", Array)
86
+ ], MarketingFeed.prototype, "filterTagIds", void 0);
87
+ __decorate([
88
+ (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.STRING(255), allowNull: true, defaultValue: null }),
89
+ __metadata("design:type", String)
90
+ ], MarketingFeed.prototype, "filterSkuSearch", void 0);
91
+ __decorate([
92
+ (0, sequelize_typescript_1.Column)({
93
+ type: sequelize_typescript_1.DataType.ENUM('csv', 'tsv', 'xml'),
94
+ allowNull: false,
95
+ defaultValue: 'csv',
96
+ }),
97
+ __metadata("design:type", String)
98
+ ], MarketingFeed.prototype, "outputFormat", void 0);
99
+ __decorate([
100
+ (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.STRING(500), allowNull: true, defaultValue: null }),
101
+ __metadata("design:type", String)
102
+ ], MarketingFeed.prototype, "storefrontBaseUrl", void 0);
103
+ __decorate([
104
+ (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DATE, allowNull: true, defaultValue: null }),
105
+ __metadata("design:type", Date)
106
+ ], MarketingFeed.prototype, "lastGeneratedAt", void 0);
107
+ __decorate([
108
+ (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.INTEGER, allowNull: true, defaultValue: null }),
109
+ __metadata("design:type", Number)
110
+ ], MarketingFeed.prototype, "lastRowCount", void 0);
111
+ __decorate([
112
+ (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.INTEGER, allowNull: true }),
113
+ __metadata("design:type", Number)
114
+ ], MarketingFeed.prototype, "createdBy", void 0);
115
+ __decorate([
116
+ (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.INTEGER, allowNull: true }),
117
+ __metadata("design:type", Number)
118
+ ], MarketingFeed.prototype, "updatedBy", void 0);
119
+ exports.MarketingFeed = MarketingFeed = __decorate([
120
+ (0, sequelize_typescript_1.Table)({ tableName: 'MarketingFeeds', paranoid: true, timestamps: true })
121
+ ], MarketingFeed);
122
+ //# sourceMappingURL=marketing-feed.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marketing-feed.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/marketing-feed.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAU8B;AAC9B,iDAAuC;AAOhC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,4BAAK;CAuFvC,CAAA;AAvFY,sCAAa;AAGhB;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;2CACpC;AAOb;IALP,IAAA,6BAAM,EAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC;QACpE,SAAS,EAAE,KAAK;QAChB,YAAY,EAAE,MAAM;KACrB,CAAC;;+CAC6B;AAOvB;IALP,IAAA,6BAAM,EAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;QACzC,SAAS,EAAE,KAAK;QAChB,YAAY,EAAE,QAAQ;KACvB,CAAC;;6CACyB;AAKnB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,oBAAK,CAAC;IACvB,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;8CAC7B;AAGhB;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,oBAAK,CAAC;8BACR,oBAAK;4CAAC;AAIb;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;;iDACjC;AAI5B;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SA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 +61,11 @@ export { UserTransaction, TransactionType, TransactionCategory, } from './entiti
61
61
  export { PurchaseOrderOrderItem } from './entities/purchase-order-order-item.entity';
62
62
  export { PurchaseOrderReceipt } from './entities/purchase-order-receipt.entity';
63
63
  export { PurchaseOrderReceiptItem } from './entities/purchase-order-receipt-item.entity';
64
+ export { OrderItemChangeLog, OrderEditScenario, } from './entities/order-item-change-log.entity';
65
+ export { OrderPayment, OrderPaymentStatus, OrderPaymentType, } from './entities/order-payment.entity';
66
+ export { OrderEditSession } from './entities/order-edit-session.entity';
67
+ export { OrderEditItem } from './entities/order-edit-item.entity';
68
+ export { MarketingFeed, FeedPlatform, FeedOutputFormat, FeedStatus, } from './entities/marketing-feed.entity';
64
69
  export { OsName } from './utils/enums/osName';
65
70
  export { ProductApp } from './utils/enums/productApp';
66
71
  export { VersionType } from './utils/enums/versiontype';
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Permission = exports.PurchaseOrderItemStatus = exports.PurchaseOrderItem = exports.PurchaseOrder = exports.VendorProduct = exports.Vendor = 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.Category = exports.UserWalletBalance = exports.RefundStatus = exports.RefundMethod = exports.Refund = exports.RunSheetOrderStatus = exports.RunSheetOrder = exports.RunSheetStatus = exports.RunSheet = 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.StockMovementType = exports.PurchaseOrderStatus = exports.Gender = exports.Status = exports.Language = exports.VersionType = exports.ProductApp = exports.OsName = 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 = void 0;
4
+ exports.StockMovementType = exports.PurchaseOrderStatus = exports.Gender = exports.Status = exports.Language = 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 = void 0;
5
5
  exports.getDbModels = getDbModels;
6
6
  const country_entity_1 = require("./entities/country.entity");
7
7
  const area_entity_1 = require("./entities/area.entity");
@@ -65,6 +65,11 @@ const refund_entity_1 = require("./entities/refund.entity");
65
65
  const purchase_order_receipt_entity_1 = require("./entities/purchase-order-receipt.entity");
66
66
  const purchase_order_receipt_item_entity_1 = require("./entities/purchase-order-receipt-item.entity");
67
67
  const user_wallet_balance_entity_1 = require("./entities/user-wallet-balance.entity");
68
+ const order_item_change_log_entity_1 = require("./entities/order-item-change-log.entity");
69
+ const order_payment_entity_1 = require("./entities/order-payment.entity");
70
+ const order_edit_session_entity_1 = require("./entities/order-edit-session.entity");
71
+ const order_edit_item_entity_1 = require("./entities/order-edit-item.entity");
72
+ const marketing_feed_entity_1 = require("./entities/marketing-feed.entity");
68
73
  var apikey_entity_2 = require("./entities/apikey.entity");
69
74
  Object.defineProperty(exports, "ApiKey", { enumerable: true, get: function () { return apikey_entity_2.ApiKey; } });
70
75
  var country_entity_2 = require("./entities/country.entity");
@@ -210,6 +215,19 @@ var purchase_order_receipt_entity_2 = require("./entities/purchase-order-receipt
210
215
  Object.defineProperty(exports, "PurchaseOrderReceipt", { enumerable: true, get: function () { return purchase_order_receipt_entity_2.PurchaseOrderReceipt; } });
211
216
  var purchase_order_receipt_item_entity_2 = require("./entities/purchase-order-receipt-item.entity");
212
217
  Object.defineProperty(exports, "PurchaseOrderReceiptItem", { enumerable: true, get: function () { return purchase_order_receipt_item_entity_2.PurchaseOrderReceiptItem; } });
218
+ var order_item_change_log_entity_2 = require("./entities/order-item-change-log.entity");
219
+ Object.defineProperty(exports, "OrderItemChangeLog", { enumerable: true, get: function () { return order_item_change_log_entity_2.OrderItemChangeLog; } });
220
+ Object.defineProperty(exports, "OrderEditScenario", { enumerable: true, get: function () { return order_item_change_log_entity_2.OrderEditScenario; } });
221
+ var order_payment_entity_2 = require("./entities/order-payment.entity");
222
+ Object.defineProperty(exports, "OrderPayment", { enumerable: true, get: function () { return order_payment_entity_2.OrderPayment; } });
223
+ Object.defineProperty(exports, "OrderPaymentStatus", { enumerable: true, get: function () { return order_payment_entity_2.OrderPaymentStatus; } });
224
+ Object.defineProperty(exports, "OrderPaymentType", { enumerable: true, get: function () { return order_payment_entity_2.OrderPaymentType; } });
225
+ var order_edit_session_entity_2 = require("./entities/order-edit-session.entity");
226
+ Object.defineProperty(exports, "OrderEditSession", { enumerable: true, get: function () { return order_edit_session_entity_2.OrderEditSession; } });
227
+ var order_edit_item_entity_2 = require("./entities/order-edit-item.entity");
228
+ Object.defineProperty(exports, "OrderEditItem", { enumerable: true, get: function () { return order_edit_item_entity_2.OrderEditItem; } });
229
+ var marketing_feed_entity_2 = require("./entities/marketing-feed.entity");
230
+ Object.defineProperty(exports, "MarketingFeed", { enumerable: true, get: function () { return marketing_feed_entity_2.MarketingFeed; } });
213
231
  var osName_1 = require("./utils/enums/osName");
214
232
  Object.defineProperty(exports, "OsName", { enumerable: true, get: function () { return osName_1.OsName; } });
215
233
  var productApp_1 = require("./utils/enums/productApp");
@@ -290,6 +308,11 @@ function getDbModels() {
290
308
  refund_entity_1.Refund,
291
309
  purchase_order_receipt_entity_1.PurchaseOrderReceipt,
292
310
  purchase_order_receipt_item_entity_1.PurchaseOrderReceiptItem,
311
+ order_item_change_log_entity_1.OrderItemChangeLog,
312
+ order_payment_entity_1.OrderPayment,
313
+ order_edit_session_entity_1.OrderEditSession,
314
+ order_edit_item_entity_1.OrderEditItem,
315
+ marketing_feed_entity_1.MarketingFeed,
293
316
  ];
294
317
  }
295
318
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../libs/tatayab-entities-library/src/index.ts"],"names":[],"mappings":";;;;AA6NA,kCAyFC;AAnTD,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;AAGzD,gEAAsD;AACtD,0DAAgD;AAChD,w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;QACR,sCAAa;QAEb,sBAAM;QACN,oDAAoB;QACpB,6DAAwB;KACzB,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../libs/tatayab-entities-library/src/index.ts"],"names":[],"mappings":";;;;AAiPA,kCAgGC;AA9UD,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;AAGzD,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;AAC5E,gFAAqE;AACrE,kGAAqF;AACrF,kEAAuD;AACvD,8EAAkE;AAClE,4DAAkD;AAClD,4FAAgF;AAChF,sGAAyF;AACzF,sFAA0E;AAC1E,0FAA6E;AAC7E,0EAA+D;AAC/D,oFAAwE;AACxE,8EAAkE;AAClE,4EAAiE;AAOjE,0DAAkD;AAAzC,uGAAA,MAAM,OAAA;AACf,4DAA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,WAAW;IACzB,OAAO;QAEL,sBAAM;QACN,kBAAI;QACJ,wBAAO;QACP,yBAAO;QACP,yBAAO;QACP,kBAAI;QACJ,8BAAU;QACV,iCAAW;QACX,mCAAY;QACZ,kDAAmB;QACnB,yCAAe;QACf,8CAAiB;QAGjB,0BAAQ;QACR,oBAAK;QACL,iCAAW;QACX,qCAAa;QACb,wBAAO;QACP,mCAAY;QACZ,uCAAc;QACd,oDAAoB;QACpB,gBAAG;QACH,+BAAU;QACV,sBAAM;QACN,qCAAa;QACb,iCAAW;QAGX,oBAAK;QACL,mCAAY;QAGZ,4BAAS;QACT,uCAAc;QACd,uCAAc;QACd,qCAAa;QACb,mCAAY;QAGZ,sBAAM;QACN,qCAAa;QACb,qCAAa;QACb,8CAAiB;QAGjB,8BAAU;QACV,uCAAc;QAGd,uCAAc;QACd,qCAAa;QACb,oDAAoB;QACpB,gDAAkB;QAGlB,kBAAI;QACJ,2BAAQ;QACR,2DAAuB;QAGvB,sBAAM;QACN,iCAAW;QACX,qCAAa;QACb,+BAAU;QAGV,iCAAW;QACX,oBAAK;QACL,6BAAS;QACT,6DAAwB;QACxB,gDAAkB;QAClB,yDAAsB;QAGtB,sBAAM;QAEN,6BAAS;QAET,2BAAQ;QACR,sCAAa;QAEb,sBAAM;QACN,oDAAoB;QACpB,6DAAwB;QAExB,iDAAkB;QAClB,mCAAY;QACZ,4CAAgB;QAChB,sCAAa;QAEb,qCAAa;KACd,CAAC;AACJ,CAAC"}
@@ -0,0 +1,106 @@
1
+ import {
2
+ Table,
3
+ Column,
4
+ Model,
5
+ DataType,
6
+ ForeignKey,
7
+ BelongsTo,
8
+ CreatedAt,
9
+ UpdatedAt,
10
+ DeletedAt,
11
+ } from 'sequelize-typescript';
12
+ import { Store } from './store.entity';
13
+
14
+ export type FeedPlatform = 'meta' | 'google' | 'tiktok' | 'snapchat' | 'other';
15
+ export type FeedOutputFormat = 'csv' | 'tsv' | 'xml';
16
+ export type FeedStatus = 'active' | 'inactive';
17
+
18
+ @Table({ tableName: 'MarketingFeeds', paranoid: true, timestamps: true })
19
+ export class MarketingFeed extends Model {
20
+ // ── Identity ───────────────────────────────────────────────────────────────
21
+ @Column({ type: DataType.STRING(255), allowNull: false })
22
+ declare name: string;
23
+
24
+ @Column({
25
+ type: DataType.ENUM('meta', 'google', 'tiktok', 'snapchat', 'other'),
26
+ allowNull: false,
27
+ defaultValue: 'meta',
28
+ })
29
+ declare platform: FeedPlatform;
30
+
31
+ @Column({
32
+ type: DataType.ENUM('active', 'inactive'),
33
+ allowNull: false,
34
+ defaultValue: 'active',
35
+ })
36
+ declare status: FeedStatus;
37
+
38
+ // ── Store / Country scope ──────────────────────────────────────────────────
39
+ @ForeignKey(() => Store)
40
+ @Column({ type: DataType.INTEGER, allowNull: false })
41
+ declare storeId: number;
42
+
43
+ @BelongsTo(() => Store)
44
+ declare store: Store;
45
+
46
+ /** JSON int[] — null means all countries for this store */
47
+ @Column({ type: DataType.JSON, allowNull: true, defaultValue: null })
48
+ declare countryIds: number[] | null;
49
+
50
+ // ── Filters ────────────────────────────────────────────────────────────────
51
+ @Column({ type: DataType.JSON, allowNull: true, defaultValue: null })
52
+ declare filterBrandIds: number[] | null;
53
+
54
+ @Column({ type: DataType.JSON, allowNull: true, defaultValue: null })
55
+ declare filterCategoryIds: number[] | null;
56
+
57
+ @Column({ type: DataType.DECIMAL(10, 3), allowNull: true, defaultValue: null })
58
+ declare filterMinPrice: number | null;
59
+
60
+ @Column({ type: DataType.DECIMAL(10, 3), allowNull: true, defaultValue: null })
61
+ declare filterMaxPrice: number | null;
62
+
63
+ @Column({ type: DataType.DECIMAL(10, 3), allowNull: true, defaultValue: null })
64
+ declare filterMinSalePrice: number | null;
65
+
66
+ @Column({ type: DataType.DECIMAL(10, 3), allowNull: true, defaultValue: null })
67
+ declare filterMaxSalePrice: number | null;
68
+
69
+ @Column({ type: DataType.BOOLEAN, allowNull: false, defaultValue: false })
70
+ declare filterOnSaleOnly: boolean;
71
+
72
+ @Column({ type: DataType.BOOLEAN, allowNull: false, defaultValue: false })
73
+ declare filterInStockOnly: boolean;
74
+
75
+ @Column({ type: DataType.JSON, allowNull: true, defaultValue: null })
76
+ declare filterTagIds: number[] | null;
77
+
78
+ @Column({ type: DataType.STRING(255), allowNull: true, defaultValue: null })
79
+ declare filterSkuSearch: string | null;
80
+
81
+ // ── Output ─────────────────────────────────────────────────────────────────
82
+ @Column({
83
+ type: DataType.ENUM('csv', 'tsv', 'xml'),
84
+ allowNull: false,
85
+ defaultValue: 'csv',
86
+ })
87
+ declare outputFormat: FeedOutputFormat;
88
+
89
+ @Column({ type: DataType.STRING(500), allowNull: true, defaultValue: null })
90
+ declare storefrontBaseUrl: string | null;
91
+
92
+ // ── Stats ──────────────────────────────────────────────────────────────────
93
+ @Column({ type: DataType.DATE, allowNull: true, defaultValue: null })
94
+ declare lastGeneratedAt: Date | null;
95
+
96
+ @Column({ type: DataType.INTEGER, allowNull: true, defaultValue: null })
97
+ declare lastRowCount: number | null;
98
+
99
+ // ── Audit ──────────────────────────────────────────────────────────────────
100
+ @Column({ type: DataType.INTEGER, allowNull: true })
101
+ declare createdBy: number | null;
102
+
103
+ @Column({ type: DataType.INTEGER, allowNull: true })
104
+ declare updatedBy: number | null;
105
+
106
+ }
@@ -81,6 +81,11 @@ import { Refund } from './entities/refund.entity';
81
81
  import { PurchaseOrderReceipt } from './entities/purchase-order-receipt.entity';
82
82
  import { PurchaseOrderReceiptItem } from './entities/purchase-order-receipt-item.entity';
83
83
  import { UserWalletBalance } from './entities/user-wallet-balance.entity';
84
+ import { OrderItemChangeLog } from './entities/order-item-change-log.entity';
85
+ import { OrderPayment } from './entities/order-payment.entity';
86
+ import { OrderEditSession } from './entities/order-edit-session.entity';
87
+ import { OrderEditItem } from './entities/order-edit-item.entity';
88
+ import { MarketingFeed } from './entities/marketing-feed.entity';
84
89
 
85
90
  // =============================================================================
86
91
  // EXPORTS
@@ -116,8 +121,6 @@ export {
116
121
  export { Refund, RefundMethod, RefundStatus } from './entities/refund.entity';
117
122
  export { UserWalletBalance } from './entities/user-wallet-balance.entity';
118
123
 
119
-
120
-
121
124
  // ─── Catalogue ────────────────────────────────────────────────────────────────
122
125
  export { Category } from './entities/category.entity';
123
126
  export { Brand } from './entities/brand.entity';
@@ -204,6 +207,23 @@ export {
204
207
  export { PurchaseOrderOrderItem } from './entities/purchase-order-order-item.entity';
205
208
  export { PurchaseOrderReceipt } from './entities/purchase-order-receipt.entity';
206
209
  export { PurchaseOrderReceiptItem } from './entities/purchase-order-receipt-item.entity';
210
+ export {
211
+ OrderItemChangeLog,
212
+ OrderEditScenario,
213
+ } from './entities/order-item-change-log.entity';
214
+ export {
215
+ OrderPayment,
216
+ OrderPaymentStatus,
217
+ OrderPaymentType,
218
+ } from './entities/order-payment.entity';
219
+ export { OrderEditSession } from './entities/order-edit-session.entity';
220
+ export { OrderEditItem } from './entities/order-edit-item.entity';
221
+ export {
222
+ MarketingFeed,
223
+ FeedPlatform,
224
+ FeedOutputFormat,
225
+ FeedStatus,
226
+ } from './entities/marketing-feed.entity';
207
227
 
208
228
  // ─── Enums ────────────────────────────────────────────────────────────────────
209
229
  export { OsName } from './utils/enums/osName';
@@ -307,5 +327,12 @@ export function getDbModels(): ModelCtor[] {
307
327
  Refund,
308
328
  PurchaseOrderReceipt,
309
329
  PurchaseOrderReceiptItem,
330
+
331
+ OrderItemChangeLog,
332
+ OrderPayment,
333
+ OrderEditSession,
334
+ OrderEditItem,
335
+
336
+ MarketingFeed,
310
337
  ];
311
338
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tt-entities",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Tatayab entities library",
5
5
  "main": "dist/libs/tatayab-entities-library/index.js",
6
6
  "types": "dist/libs/tatayab-entities-library/index.d.ts",
@@ -0,0 +1,187 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('sequelize-cli').Migration} */
4
+ module.exports = {
5
+ async up(queryInterface, Sequelize) {
6
+ await queryInterface.createTable('MarketingFeeds', {
7
+ id: {
8
+ type: Sequelize.INTEGER,
9
+ autoIncrement: true,
10
+ primaryKey: true,
11
+ allowNull: false,
12
+ },
13
+
14
+ // ── Identity ────────────────────────────────────────────────────────────
15
+ name: {
16
+ type: Sequelize.STRING(255),
17
+ allowNull: false,
18
+ comment: 'Admin-defined label, e.g. "Kuwait — Fragrances Q3"',
19
+ },
20
+ platform: {
21
+ type: Sequelize.ENUM('meta', 'google', 'tiktok', 'snapchat', 'other'),
22
+ allowNull: false,
23
+ defaultValue: 'meta',
24
+ comment: 'Ad platform this feed is generated for',
25
+ },
26
+ status: {
27
+ type: Sequelize.ENUM('active', 'inactive'),
28
+ allowNull: false,
29
+ defaultValue: 'active',
30
+ },
31
+
32
+ // ── Store / Country scope ────────────────────────────────────────────────
33
+ storeId: {
34
+ type: Sequelize.INTEGER,
35
+ allowNull: false,
36
+ references: { model: 'Stores', key: 'id' },
37
+ onUpdate: 'CASCADE',
38
+ onDelete: 'RESTRICT',
39
+ comment: 'The store this feed is scoped to',
40
+ },
41
+ /**
42
+ * For non-global stores this will equal the store's single countryId.
43
+ * For global stores the admin can pick one or more countries — stored
44
+ * as a JSON array of countryId integers, e.g. [1, 3, 5].
45
+ * NULL means "all countries served by this store".
46
+ */
47
+ countryIds: {
48
+ type: Sequelize.JSON,
49
+ allowNull: true,
50
+ defaultValue: null,
51
+ comment: 'JSON int[] of countryIds; null = all countries for this store',
52
+ },
53
+
54
+ // ── Product filters ──────────────────────────────────────────────────────
55
+ /**
56
+ * Each filter field is nullable. NULL = no filter applied (include all).
57
+ * Arrays stored as JSON int[].
58
+ */
59
+ filterBrandIds: {
60
+ type: Sequelize.JSON,
61
+ allowNull: true,
62
+ defaultValue: null,
63
+ comment: 'JSON int[] of Brand IDs to include; null = all brands',
64
+ },
65
+ filterCategoryIds: {
66
+ type: Sequelize.JSON,
67
+ allowNull: true,
68
+ defaultValue: null,
69
+ comment: 'JSON int[] of Category IDs (incl. descendants resolved at runtime); null = all',
70
+ },
71
+ filterMinPrice: {
72
+ type: Sequelize.DECIMAL(10, 3),
73
+ allowNull: true,
74
+ defaultValue: null,
75
+ comment: 'Min regularPrice in store currency; null = no floor',
76
+ },
77
+ filterMaxPrice: {
78
+ type: Sequelize.DECIMAL(10, 3),
79
+ allowNull: true,
80
+ defaultValue: null,
81
+ comment: 'Max regularPrice in store currency; null = no ceiling',
82
+ },
83
+ filterMinSalePrice: {
84
+ type: Sequelize.DECIMAL(10, 3),
85
+ allowNull: true,
86
+ defaultValue: null,
87
+ comment: 'Min salePrice; null = no filter',
88
+ },
89
+ filterMaxSalePrice: {
90
+ type: Sequelize.DECIMAL(10, 3),
91
+ allowNull: true,
92
+ defaultValue: null,
93
+ comment: 'Max salePrice; null = no filter',
94
+ },
95
+ filterOnSaleOnly: {
96
+ type: Sequelize.BOOLEAN,
97
+ allowNull: false,
98
+ defaultValue: false,
99
+ comment: 'If true, only include SKUs where salePrice < regularPrice',
100
+ },
101
+ filterInStockOnly: {
102
+ type: Sequelize.BOOLEAN,
103
+ allowNull: false,
104
+ defaultValue: false,
105
+ comment: 'If true, only include SKUs with physicalQty > 0 or availableFromVendor',
106
+ },
107
+ filterTagIds: {
108
+ type: Sequelize.JSON,
109
+ allowNull: true,
110
+ defaultValue: null,
111
+ comment: 'JSON int[] of Tag IDs; null = no tag filter',
112
+ },
113
+ filterSkuSearch: {
114
+ type: Sequelize.STRING(255),
115
+ allowNull: true,
116
+ defaultValue: null,
117
+ comment: 'Optional SKU prefix/substring filter',
118
+ },
119
+
120
+ // ── Output options ───────────────────────────────────────────────────────
121
+ outputFormat: {
122
+ type: Sequelize.ENUM('csv', 'tsv', 'xml'),
123
+ allowNull: false,
124
+ defaultValue: 'csv',
125
+ },
126
+ /**
127
+ * Storefront base URL used to build product deep-links in the feed.
128
+ * e.g. "https://tatayab.com/kw"
129
+ */
130
+ storefrontBaseUrl: {
131
+ type: Sequelize.STRING(500),
132
+ allowNull: true,
133
+ defaultValue: null,
134
+ },
135
+
136
+ // ── Stats (updated on each generation) ──────────────────────────────────
137
+ lastGeneratedAt: {
138
+ type: Sequelize.DATE,
139
+ allowNull: true,
140
+ defaultValue: null,
141
+ },
142
+ lastRowCount: {
143
+ type: Sequelize.INTEGER,
144
+ allowNull: true,
145
+ defaultValue: null,
146
+ comment: 'Number of SKU rows in the last generated feed',
147
+ },
148
+
149
+ // ── Audit ────────────────────────────────────────────────────────────────
150
+ createdBy: {
151
+ type: Sequelize.INTEGER,
152
+ allowNull: true,
153
+ comment: 'SysUser id who created this feed config',
154
+ },
155
+ updatedBy: {
156
+ type: Sequelize.INTEGER,
157
+ allowNull: true,
158
+ },
159
+ createdAt: {
160
+ type: Sequelize.DATE,
161
+ allowNull: false,
162
+ defaultValue: Sequelize.literal('CURRENT_TIMESTAMP'),
163
+ },
164
+ updatedAt: {
165
+ type: Sequelize.DATE,
166
+ allowNull: false,
167
+ defaultValue: Sequelize.literal('CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'),
168
+ },
169
+ deletedAt: {
170
+ type: Sequelize.DATE,
171
+ allowNull: true,
172
+ defaultValue: null,
173
+ comment: 'Soft delete',
174
+ },
175
+ });
176
+
177
+ // ── Indexes ──────────────────────────────────────────────────────────────
178
+ await queryInterface.addIndex('MarketingFeeds', ['storeId'], { name: 'mf_store_idx' });
179
+ await queryInterface.addIndex('MarketingFeeds', ['status'], { name: 'mf_status_idx' });
180
+ await queryInterface.addIndex('MarketingFeeds', ['platform'], { name: 'mf_platform_idx' });
181
+ await queryInterface.addIndex('MarketingFeeds', ['deletedAt'], { name: 'mf_deleted_idx' });
182
+ },
183
+
184
+ async down(queryInterface) {
185
+ await queryInterface.dropTable('MarketingFeeds');
186
+ },
187
+ };