tt-entities 0.1.24 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/libs/tatayab-entities-library/entities/category.entity.d.ts +1 -0
- package/dist/libs/tatayab-entities-library/entities/category.entity.js +4 -0
- package/dist/libs/tatayab-entities-library/entities/category.entity.js.map +1 -1
- package/dist/libs/tatayab-entities-library/entities/order-gift-message.entity.d.ts +9 -0
- package/dist/libs/tatayab-entities-library/entities/order-gift-message.entity.js +42 -0
- package/dist/libs/tatayab-entities-library/entities/order-gift-message.entity.js.map +1 -0
- package/dist/libs/tatayab-entities-library/entities/order.entity.d.ts +2 -0
- package/dist/libs/tatayab-entities-library/entities/order.entity.js +5 -0
- package/dist/libs/tatayab-entities-library/entities/order.entity.js.map +1 -1
- package/dist/libs/tatayab-entities-library/index.d.ts +1 -0
- package/dist/libs/tatayab-entities-library/index.js +5 -1
- package/dist/libs/tatayab-entities-library/index.js.map +1 -1
- package/libs/tatayab-entities-library/src/entities/category.entity.ts +3 -0
- package/libs/tatayab-entities-library/src/entities/order-gift-message.entity.ts +28 -0
- package/libs/tatayab-entities-library/src/entities/order.entity.ts +5 -0
- package/libs/tatayab-entities-library/src/index.ts +5 -0
- package/package.json +1 -1
- package/src/database/migrations/20260826100000-add-gift-message.js +37 -0
|
@@ -54,6 +54,10 @@ __decorate([
|
|
|
54
54
|
}),
|
|
55
55
|
__metadata("design:type", String)
|
|
56
56
|
], Category.prototype, "listingType", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.BOOLEAN, defaultValue: false }),
|
|
59
|
+
__metadata("design:type", Boolean)
|
|
60
|
+
], Category.prototype, "requiresGiftMessage", void 0);
|
|
57
61
|
__decorate([
|
|
58
62
|
(0, sequelize_typescript_1.ForeignKey)(() => Category),
|
|
59
63
|
(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;AAC/C,4EAAyE;AAGlE,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,4BAAK;
|
|
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;CA2ClC,CAAA;AA3CY,4BAAQ;AAEX;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;wCACN;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;wCACN;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;+CAClB;AAGvB;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;+CAClB;AAGvB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;uCACL;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;2CACF;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;;wCACqB;AAMf;IAJP,IAAA,6BAAM,EAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,yCAAmB,CAAC,CAAC;QAC1D,YAAY,EAAE,yCAAmB,CAAC,SAAS;KAC5C,CAAC;;6CACuC;AAGjC;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;;qDACnB;AAI7B;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,QAAQ,CAAC;IAC1B,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;0CACF;AAGlB;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC;8BACnD,QAAQ;wCAAC;AAGlB;IADP,IAAA,8BAAO,EAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC;;0CACtC;mBA1CnB,QAAQ;IADpB,4BAAK;GACO,QAAQ,CA2CpB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
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.OrderGiftMessage = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const order_entity_1 = require("./order.entity");
|
|
15
|
+
let OrderGiftMessage = class OrderGiftMessage extends sequelize_typescript_1.Model {
|
|
16
|
+
};
|
|
17
|
+
exports.OrderGiftMessage = OrderGiftMessage;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, sequelize_typescript_1.ForeignKey)(() => order_entity_1.Order),
|
|
20
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, unique: true }),
|
|
21
|
+
__metadata("design:type", Number)
|
|
22
|
+
], OrderGiftMessage.prototype, "orderId", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, sequelize_typescript_1.BelongsTo)(() => order_entity_1.Order),
|
|
25
|
+
__metadata("design:type", order_entity_1.Order)
|
|
26
|
+
], OrderGiftMessage.prototype, "order", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], OrderGiftMessage.prototype, "recipientName", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT, allowNull: false }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], OrderGiftMessage.prototype, "message", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, sequelize_typescript_1.Column)({ allowNull: true }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], OrderGiftMessage.prototype, "senderName", void 0);
|
|
39
|
+
exports.OrderGiftMessage = OrderGiftMessage = __decorate([
|
|
40
|
+
sequelize_typescript_1.Table
|
|
41
|
+
], OrderGiftMessage);
|
|
42
|
+
//# sourceMappingURL=order-gift-message.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order-gift-message.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/order-gift-message.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAO8B;AAC9B,iDAAuC;AAGhC,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,4BAAK;CAgB1C,CAAA;AAhBY,4CAAgB;AAGnB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,oBAAK,CAAC;IACvB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;iDACnB;AAGhB;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,oBAAK,CAAC;8BACR,oBAAK;+CAAC;AAGb;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;uDACC;AAGtB;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;iDAC1B;AAGhB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;oDACA;2BAfjB,gBAAgB;IAD5B,4BAAK;GACO,gBAAgB,CAgB5B"}
|
|
@@ -10,6 +10,7 @@ import { OrderItemChangeLog } from './order-item-change-log.entity';
|
|
|
10
10
|
import { OrderPayment } from './order-payment.entity';
|
|
11
11
|
import { OrderEditSession } from './order-edit-session.entity';
|
|
12
12
|
import { ReturnRequest } from './return-request.entity';
|
|
13
|
+
import { OrderGiftMessage } from './order-gift-message.entity';
|
|
13
14
|
export declare class Order extends Model {
|
|
14
15
|
orderNumber: string;
|
|
15
16
|
userId?: number;
|
|
@@ -69,4 +70,5 @@ export declare class Order extends Model {
|
|
|
69
70
|
additionalPayments: OrderPayment[];
|
|
70
71
|
editSessions: OrderEditSession[];
|
|
71
72
|
returnRequests: ReturnRequest[];
|
|
73
|
+
giftMessage?: OrderGiftMessage;
|
|
72
74
|
}
|
|
@@ -22,6 +22,7 @@ const order_item_change_log_entity_1 = require("./order-item-change-log.entity")
|
|
|
22
22
|
const order_payment_entity_1 = require("./order-payment.entity");
|
|
23
23
|
const order_edit_session_entity_1 = require("./order-edit-session.entity");
|
|
24
24
|
const return_request_entity_1 = require("./return-request.entity");
|
|
25
|
+
const order_gift_message_entity_1 = require("./order-gift-message.entity");
|
|
25
26
|
let Order = class Order extends sequelize_typescript_1.Model {
|
|
26
27
|
};
|
|
27
28
|
exports.Order = Order;
|
|
@@ -264,6 +265,10 @@ __decorate([
|
|
|
264
265
|
(0, sequelize_typescript_1.HasMany)(() => return_request_entity_1.ReturnRequest),
|
|
265
266
|
__metadata("design:type", Array)
|
|
266
267
|
], Order.prototype, "returnRequests", void 0);
|
|
268
|
+
__decorate([
|
|
269
|
+
(0, sequelize_typescript_1.HasOne)(() => order_gift_message_entity_1.OrderGiftMessage),
|
|
270
|
+
__metadata("design:type", order_gift_message_entity_1.OrderGiftMessage)
|
|
271
|
+
], Order.prototype, "giftMessage", void 0);
|
|
267
272
|
exports.Order = Order = __decorate([
|
|
268
273
|
sequelize_typescript_1.Table
|
|
269
274
|
], Order);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/order.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+
|
|
1
|
+
{"version":3,"file":"order.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/order.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAS8B;AAC9B,+CAAqC;AACrC,iDAAuC;AACvC,qDAA2C;AAC3C,+DAAoD;AACpD,2DAAgD;AAChD,+EAAmE;AACnE,uEAA4D;AAC5D,iFAAoE;AACpE,iEAAsD;AACtD,2EAA+D;AAC/D,mEAAwD;AACxD,2EAA+D;AAGxD,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,4BAAK;CA6M/B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,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;4CAClB;AAKvB;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,CAAC;8BACP,kBAAI;mCAAC;AAGZ;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,oBAAK,CAAC;8BACR,oBAAK;oCAAC;AAGb;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,iCAAW,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;8BACzC,iCAAW;qCAAC;AAGpB;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;8BACC,wBAAO;8CAAC;AAG1B;IADP,IAAA,8BAAO,EAAC,GAAG,EAAE,CAAC,6BAAS,CAAC;;oCACE;AAGnB;IADP,IAAA,8BAAO,EAAC,GAAG,EAAE,CAAC,gDAAkB,CAAC;;4CACU;AAGpC;IADP,IAAA,8BAAO,EAAC,GAAG,EAAE,CAAC,yCAAe,CAAC;;2CACS;AAGhC;IADP,IAAA,8BAAO,EAAC,GAAG,EAAE,CAAC,iDAAkB,CAAC;;yCACO;AAGjC;IADP,IAAA,8BAAO,EAAC,GAAG,EAAE,CAAC,mCAAY,CAAC;;iDACe;AAGnC;IADP,IAAA,8BAAO,EAAC,GAAG,EAAE,CAAC,4CAAgB,CAAC;;2CACS;AAGjC;IADP,IAAA,8BAAO,EAAC,GAAG,EAAE,CAAC,qCAAa,CAAC;;6CACW;AAGhC;IADP,IAAA,6BAAM,EAAC,GAAG,EAAE,CAAC,4CAAgB,CAAC;8BACT,4CAAgB;0CAAC;gBA5M5B,KAAK;IADjB,4BAAK;GACO,KAAK,CA6MjB"}
|
|
@@ -79,6 +79,7 @@ export { OrderEditSession } from './entities/order-edit-session.entity';
|
|
|
79
79
|
export { OrderEditItem } from './entities/order-edit-item.entity';
|
|
80
80
|
export { ReturnRequest, ReturnRequestStatus, } from './entities/return-request.entity';
|
|
81
81
|
export { ReturnRequestItem, ReturnItemStatus, ReturnItemDestination, } from './entities/return-request-item.entity';
|
|
82
|
+
export { OrderGiftMessage } from './entities/order-gift-message.entity';
|
|
82
83
|
export { MarketingFeed, FeedPlatform, FeedOutputFormat, FeedStatus, } from './entities/marketing-feed.entity';
|
|
83
84
|
export { OsName } from './utils/enums/osName';
|
|
84
85
|
export { ProductApp } from './utils/enums/productApp';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
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.SpinPrizeStatus = exports.SpinWheelPrize = exports.SpinWheelSpin = exports.SpinWheelItemStatus = exports.SpinPrizeType = exports.SpinWheelItem = exports.SpinFrequency = exports.SpinWheelStatus = exports.SpinWheel = 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
4
|
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.PurchaseReturnDocumentType = exports.PurchaseReturnDocument = exports.PurchaseReturnItem = exports.PurchaseReturn = 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.BundleType = exports.BundleStore = exports.BundleProduct = void 0;
|
|
5
|
-
exports.StockMovementType = exports.PurchaseReturnStatus = exports.PurchaseOrderStatus = exports.Gender = exports.Status = exports.Language = exports.VersionType = exports.ProductApp = exports.OsName = exports.MarketingFeed = exports.ReturnItemDestination = exports.ReturnItemStatus = exports.ReturnRequestItem = exports.ReturnRequestStatus = exports.ReturnRequest = exports.OrderEditItem = exports.OrderEditSession = exports.OrderPaymentType = exports.OrderPaymentStatus = exports.OrderPayment = exports.OrderEditScenario = exports.OrderItemChangeLog = exports.PurchaseOrderReceiptItem = exports.PurchaseOrderReceipt = exports.PurchaseOrderOrderItem = void 0;
|
|
5
|
+
exports.StockMovementType = exports.PurchaseReturnStatus = exports.PurchaseOrderStatus = exports.Gender = exports.Status = exports.Language = exports.VersionType = exports.ProductApp = exports.OsName = exports.MarketingFeed = exports.OrderGiftMessage = exports.ReturnItemDestination = exports.ReturnItemStatus = exports.ReturnRequestItem = exports.ReturnRequestStatus = exports.ReturnRequest = exports.OrderEditItem = exports.OrderEditSession = exports.OrderPaymentType = exports.OrderPaymentStatus = exports.OrderPayment = exports.OrderEditScenario = exports.OrderItemChangeLog = exports.PurchaseOrderReceiptItem = exports.PurchaseOrderReceipt = exports.PurchaseOrderOrderItem = void 0;
|
|
6
6
|
exports.getDbModels = getDbModels;
|
|
7
7
|
const country_entity_1 = require("./entities/country.entity");
|
|
8
8
|
const area_entity_1 = require("./entities/area.entity");
|
|
@@ -83,6 +83,7 @@ const marketing_feed_entity_1 = require("./entities/marketing-feed.entity");
|
|
|
83
83
|
const PasswordResetOtp_1 = require("./entities/PasswordResetOtp");
|
|
84
84
|
const return_request_entity_1 = require("./entities/return-request.entity");
|
|
85
85
|
const return_request_item_entity_1 = require("./entities/return-request-item.entity");
|
|
86
|
+
const order_gift_message_entity_1 = require("./entities/order-gift-message.entity");
|
|
86
87
|
var apikey_entity_2 = require("./entities/apikey.entity");
|
|
87
88
|
Object.defineProperty(exports, "ApiKey", { enumerable: true, get: function () { return apikey_entity_2.ApiKey; } });
|
|
88
89
|
var country_entity_2 = require("./entities/country.entity");
|
|
@@ -278,6 +279,8 @@ var return_request_item_entity_2 = require("./entities/return-request-item.entit
|
|
|
278
279
|
Object.defineProperty(exports, "ReturnRequestItem", { enumerable: true, get: function () { return return_request_item_entity_2.ReturnRequestItem; } });
|
|
279
280
|
Object.defineProperty(exports, "ReturnItemStatus", { enumerable: true, get: function () { return return_request_item_entity_2.ReturnItemStatus; } });
|
|
280
281
|
Object.defineProperty(exports, "ReturnItemDestination", { enumerable: true, get: function () { return return_request_item_entity_2.ReturnItemDestination; } });
|
|
282
|
+
var order_gift_message_entity_2 = require("./entities/order-gift-message.entity");
|
|
283
|
+
Object.defineProperty(exports, "OrderGiftMessage", { enumerable: true, get: function () { return order_gift_message_entity_2.OrderGiftMessage; } });
|
|
281
284
|
var marketing_feed_entity_2 = require("./entities/marketing-feed.entity");
|
|
282
285
|
Object.defineProperty(exports, "MarketingFeed", { enumerable: true, get: function () { return marketing_feed_entity_2.MarketingFeed; } });
|
|
283
286
|
var osName_1 = require("./utils/enums/osName");
|
|
@@ -379,6 +382,7 @@ function getDbModels() {
|
|
|
379
382
|
spin_wheel_prize_entity_1.SpinWheelPrize,
|
|
380
383
|
return_request_entity_1.ReturnRequest,
|
|
381
384
|
return_request_item_entity_1.ReturnRequestItem,
|
|
385
|
+
order_gift_message_entity_1.OrderGiftMessage,
|
|
382
386
|
];
|
|
383
387
|
}
|
|
384
388
|
//# 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":";;;;;AA0SA,kCAqHC;AA5ZD,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,oEAAyD;AACzD,8EAAkE;AAClE,8EAAkE;AAClE,gFAAoE;AAGpE,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;AAC1E,8EAAmE;AACnE,wFAA4E;AAC5E,gGAAoF;AAGpF,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,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AW;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;QACjB,uCAAc;QACd,gDAAkB;QAClB,wDAAsB;QAGtB,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;QACb,mCAAgB;QAGhB,yBAAO;QACP,oCAAY;QAGZ,6BAAS;QACT,sCAAa;QACb,sCAAa;QACb,wCAAc;QAGd,qCAAa;QACb,8CAAiB;QAGjB,4CAAgB;KACjB,CAAC;AACJ,CAAC"}
|
|
@@ -42,6 +42,9 @@ export class Category extends Model {
|
|
|
42
42
|
})
|
|
43
43
|
declare listingType: CategoryListingType;
|
|
44
44
|
|
|
45
|
+
@Column({ type: DataType.BOOLEAN, defaultValue: false })
|
|
46
|
+
declare requiresGiftMessage: boolean;
|
|
47
|
+
|
|
45
48
|
@ForeignKey(() => Category)
|
|
46
49
|
@Column({ allowNull: true })
|
|
47
50
|
declare parentId?: number;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Table,
|
|
3
|
+
Column,
|
|
4
|
+
Model,
|
|
5
|
+
DataType,
|
|
6
|
+
ForeignKey,
|
|
7
|
+
BelongsTo,
|
|
8
|
+
} from 'sequelize-typescript';
|
|
9
|
+
import { Order } from './order.entity';
|
|
10
|
+
|
|
11
|
+
@Table
|
|
12
|
+
export class OrderGiftMessage extends Model {
|
|
13
|
+
@ForeignKey(() => Order)
|
|
14
|
+
@Column({ allowNull: false, unique: true })
|
|
15
|
+
declare orderId: number;
|
|
16
|
+
|
|
17
|
+
@BelongsTo(() => Order)
|
|
18
|
+
declare order: Order;
|
|
19
|
+
|
|
20
|
+
@Column({ allowNull: false })
|
|
21
|
+
declare recipientName: string;
|
|
22
|
+
|
|
23
|
+
@Column({ type: DataType.TEXT, allowNull: false })
|
|
24
|
+
declare message: string;
|
|
25
|
+
|
|
26
|
+
@Column({ allowNull: true })
|
|
27
|
+
declare senderName?: string;
|
|
28
|
+
}
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
ForeignKey,
|
|
6
6
|
BelongsTo,
|
|
7
7
|
HasMany,
|
|
8
|
+
HasOne,
|
|
8
9
|
DataType,
|
|
9
10
|
} from 'sequelize-typescript';
|
|
10
11
|
import { User } from './user.entity';
|
|
@@ -18,6 +19,7 @@ import { OrderItemChangeLog } from './order-item-change-log.entity';
|
|
|
18
19
|
import { OrderPayment } from './order-payment.entity';
|
|
19
20
|
import { OrderEditSession } from './order-edit-session.entity';
|
|
20
21
|
import { ReturnRequest } from './return-request.entity';
|
|
22
|
+
import { OrderGiftMessage } from './order-gift-message.entity';
|
|
21
23
|
|
|
22
24
|
@Table
|
|
23
25
|
export class Order extends Model {
|
|
@@ -222,4 +224,7 @@ export class Order extends Model {
|
|
|
222
224
|
|
|
223
225
|
@HasMany(() => ReturnRequest)
|
|
224
226
|
declare returnRequests: ReturnRequest[];
|
|
227
|
+
|
|
228
|
+
@HasOne(() => OrderGiftMessage)
|
|
229
|
+
declare giftMessage?: OrderGiftMessage;
|
|
225
230
|
}
|
|
@@ -100,6 +100,7 @@ import { MarketingFeed } from './entities/marketing-feed.entity';
|
|
|
100
100
|
import { PasswordResetOtp } from './entities/PasswordResetOtp';
|
|
101
101
|
import { ReturnRequest } from './entities/return-request.entity';
|
|
102
102
|
import { ReturnRequestItem } from './entities/return-request-item.entity';
|
|
103
|
+
import { OrderGiftMessage } from './entities/order-gift-message.entity';
|
|
103
104
|
|
|
104
105
|
// =============================================================================
|
|
105
106
|
// EXPORTS
|
|
@@ -272,6 +273,7 @@ export {
|
|
|
272
273
|
ReturnItemStatus,
|
|
273
274
|
ReturnItemDestination,
|
|
274
275
|
} from './entities/return-request-item.entity';
|
|
276
|
+
export { OrderGiftMessage } from './entities/order-gift-message.entity';
|
|
275
277
|
export {
|
|
276
278
|
MarketingFeed,
|
|
277
279
|
FeedPlatform,
|
|
@@ -407,5 +409,8 @@ export function getDbModels(): ModelCtor[] {
|
|
|
407
409
|
// Returns
|
|
408
410
|
ReturnRequest,
|
|
409
411
|
ReturnRequestItem,
|
|
412
|
+
|
|
413
|
+
// Gift Messages
|
|
414
|
+
OrderGiftMessage,
|
|
410
415
|
];
|
|
411
416
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/** @type {import('sequelize-cli').Migration} */
|
|
4
|
+
module.exports = {
|
|
5
|
+
async up(queryInterface, Sequelize) {
|
|
6
|
+
// ── 1. Add requiresGiftMessage to Categories ───────────────────────────────
|
|
7
|
+
await queryInterface.addColumn('Categories', 'requiresGiftMessage', {
|
|
8
|
+
type: Sequelize.BOOLEAN,
|
|
9
|
+
allowNull: false,
|
|
10
|
+
defaultValue: false,
|
|
11
|
+
after: 'listingType',
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
// ── 2. Create OrderGiftMessages table ─────────────────────────────────────
|
|
15
|
+
await queryInterface.createTable('OrderGiftMessages', {
|
|
16
|
+
id: { type: Sequelize.INTEGER, autoIncrement: true, primaryKey: true },
|
|
17
|
+
orderId: {
|
|
18
|
+
type: Sequelize.INTEGER,
|
|
19
|
+
allowNull: false,
|
|
20
|
+
unique: true,
|
|
21
|
+
references: { model: 'Orders', key: 'id' },
|
|
22
|
+
onUpdate: 'CASCADE',
|
|
23
|
+
onDelete: 'CASCADE',
|
|
24
|
+
},
|
|
25
|
+
recipientName: { type: Sequelize.STRING, allowNull: false },
|
|
26
|
+
message: { type: Sequelize.TEXT, allowNull: false },
|
|
27
|
+
senderName: { type: Sequelize.STRING, allowNull: true },
|
|
28
|
+
createdAt: { type: Sequelize.DATE, allowNull: false },
|
|
29
|
+
updatedAt: { type: Sequelize.DATE, allowNull: false },
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
async down(queryInterface) {
|
|
34
|
+
await queryInterface.dropTable('OrderGiftMessages');
|
|
35
|
+
await queryInterface.removeColumn('Categories', 'requiresGiftMessage');
|
|
36
|
+
},
|
|
37
|
+
};
|