@b2y/ecommerce-common 1.3.5 → 1.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/.idea/ecommerce-common.iml +11 -11
  2. package/.idea/modules.xml +7 -7
  3. package/.idea/vcs.xml +5 -5
  4. package/README.md +4 -4
  5. package/constants/AppConstants.js +15 -15
  6. package/constants/ReportConstants.js +14 -14
  7. package/constants/StatusMessageConstants.js +61 -61
  8. package/controller/LocationController.js +144 -144
  9. package/controller/SubscriptionAbstractController.js +91 -91
  10. package/controller/TenantAbstractController.js +152 -152
  11. package/controller/TenantSettingsAbstractController.js +243 -243
  12. package/dbconnection/Connect.js +498 -498
  13. package/enum/AccessModeEnum.js +8 -8
  14. package/enum/ActionByTypeEnum.js +4 -4
  15. package/enum/AddressTypeEnum.js +6 -6
  16. package/enum/BillingCycleEnum.js +5 -5
  17. package/enum/BooleanEnum.js +4 -4
  18. package/enum/BulkImportStatusEnum.js +6 -6
  19. package/enum/EntityTypeEnum.js +12 -11
  20. package/enum/FeatureTypeEnum.js +6 -6
  21. package/enum/GenderEnum.js +7 -7
  22. package/enum/NotificationStatusEnum.js +5 -5
  23. package/enum/NotificationTypeEnum.js +9 -9
  24. package/enum/OrderActionStatusEnum.js +7 -7
  25. package/enum/OrderStatusEnum.js +7 -7
  26. package/enum/PackageBoxTypeEnum.js +6 -6
  27. package/enum/PaymentMethodEnum.js +6 -6
  28. package/enum/PaymentStatusEnum.js +6 -6
  29. package/enum/PaymentTypeEnum.js +6 -6
  30. package/enum/PlatformEnum.js +4 -4
  31. package/enum/ReasonTypeEnum.js +6 -6
  32. package/enum/RegistrationStatusEnum.js +5 -5
  33. package/enum/SortByEnum.js +7 -7
  34. package/enum/SubscriptionStatusEnum.js +7 -7
  35. package/index.js +28 -28
  36. package/model/Address.js +95 -95
  37. package/model/AttributeType.js +50 -50
  38. package/model/AttributeValue.js +64 -64
  39. package/model/Banner.js +78 -78
  40. package/model/Brand.js +76 -76
  41. package/model/Cart.js +76 -76
  42. package/model/Category.js +72 -72
  43. package/model/CategoryAttributeType.js +62 -62
  44. package/model/Colour.js +52 -52
  45. package/model/Customer.js +94 -94
  46. package/model/DeviceToken.js +51 -51
  47. package/model/Document.js +73 -73
  48. package/model/DynamicUIComponent.js +52 -52
  49. package/model/Feedback.js +79 -79
  50. package/model/Inventory.js +87 -87
  51. package/model/NotificationHistory.js +67 -67
  52. package/model/Order.js +84 -84
  53. package/model/OrderActionReason.js +99 -99
  54. package/model/OrderItem.js +98 -98
  55. package/model/OrderItemHistory.js +69 -69
  56. package/model/OrderStatus.js +48 -48
  57. package/model/PackagingBox.js +78 -78
  58. package/model/Payment.js +101 -101
  59. package/model/PaymentMethod.js +36 -36
  60. package/model/PaymentStatus.js +36 -36
  61. package/model/PaymentType.js +36 -36
  62. package/model/Permission.js +55 -55
  63. package/model/Product.js +97 -97
  64. package/model/ProductGroup.js +48 -48
  65. package/model/ProductImport.js +55 -55
  66. package/model/ProductImportFailureAudits.js +57 -57
  67. package/model/ProductSpecification.js +65 -65
  68. package/model/ProductVariant.js +111 -111
  69. package/model/ProductVariantAttribute.js +58 -58
  70. package/model/ReasonContextMapping.js +70 -70
  71. package/model/ReasonMaster.js +74 -74
  72. package/model/Role.js +61 -61
  73. package/model/RolePermissionMapping.js +63 -63
  74. package/model/SpecificationType.js +41 -41
  75. package/model/Store.js +99 -99
  76. package/model/StoreUserMapping.js +44 -44
  77. package/model/SubscriptionFeature.js +53 -53
  78. package/model/SubscriptionPlan.js +70 -70
  79. package/model/SubscriptionPlanFeature.js +48 -48
  80. package/model/Tenant.js +91 -91
  81. package/model/TenantSettings.js +47 -47
  82. package/model/TenantSubscription.js +73 -73
  83. package/model/User.js +132 -132
  84. package/model/WishList.js +62 -62
  85. package/package.json +30 -30
  86. package/scripts/QueryBuilder.js +162 -162
  87. package/utility/AppUtil.js +65 -65
  88. package/utility/DateUtil.js +55 -55
  89. package/utility/ExcelUtil.js +125 -125
  90. package/utility/LocationUtility.js +130 -130
  91. package/utility/OrderTimeFilterUtil.js +88 -88
  92. package/utility/PdfUtil.js +64 -64
  93. package/utility/QueryUtil.js +261 -261
  94. package/utility/Razorpay.js +65 -65
  95. package/utility/ResolveAccessMode.js +61 -61
  96. package/utility/VariantPriceUtil.js +54 -54
@@ -1,9 +1,9 @@
1
- const AccessModeEnum = Object.freeze({
2
- FULL: "Full",
3
- READ_ONLY: "Read Only",
4
- BLOCKED: "Blocked",
5
- PAYMENT_REQUIRED: "Payment Required",
6
- RENEW_SUBSCRIPTION: "Renew Subscription"
7
- });
8
-
1
+ const AccessModeEnum = Object.freeze({
2
+ FULL: "Full",
3
+ READ_ONLY: "Read Only",
4
+ BLOCKED: "Blocked",
5
+ PAYMENT_REQUIRED: "Payment Required",
6
+ RENEW_SUBSCRIPTION: "Renew Subscription"
7
+ });
8
+
9
9
  module.exports = AccessModeEnum;
@@ -1,5 +1,5 @@
1
- const ActionByTypeEnum = Object.freeze({
2
- CUSTOMER: "Customer",
3
- ADMIN: "Admin"
4
- });
1
+ const ActionByTypeEnum = Object.freeze({
2
+ CUSTOMER: "Customer",
3
+ ADMIN: "Admin"
4
+ });
5
5
  module.exports = ActionByTypeEnum;
@@ -1,7 +1,7 @@
1
- const AddressTypeEnum = Object.freeze({
2
- HOME: "Home",
3
- WORK: "Work",
4
- OTHER: "Other"
5
- });
6
-
1
+ const AddressTypeEnum = Object.freeze({
2
+ HOME: "Home",
3
+ WORK: "Work",
4
+ OTHER: "Other"
5
+ });
6
+
7
7
  module.exports = AddressTypeEnum;
@@ -1,6 +1,6 @@
1
- const BillingCycleEnum = Object.freeze({
2
- MONTHLY: "Monthly",
3
- YEARLY: "Yearly"
4
- });
5
-
1
+ const BillingCycleEnum = Object.freeze({
2
+ MONTHLY: "Monthly",
3
+ YEARLY: "Yearly"
4
+ });
5
+
6
6
  module.exports = BillingCycleEnum;
@@ -1,5 +1,5 @@
1
- const BooleanEnum = Object.freeze({
2
- TRUE: true,
3
- FALSE: false
4
- });
1
+ const BooleanEnum = Object.freeze({
2
+ TRUE: true,
3
+ FALSE: false
4
+ });
5
5
  module.exports = BooleanEnum;
@@ -1,7 +1,7 @@
1
- const BulkImportStatusEnum = Object.freeze({
2
- SUCCESS: "Success",
3
- FAILURE: "Failure",
4
- PARTIAL_SUCCESS: "Partial Success"
5
- });
6
-
1
+ const BulkImportStatusEnum = Object.freeze({
2
+ SUCCESS: "Success",
3
+ FAILURE: "Failure",
4
+ PARTIAL_SUCCESS: "Partial Success"
5
+ });
6
+
7
7
  module.exports = BulkImportStatusEnum;
@@ -1,12 +1,13 @@
1
- const EntityTypeEnum = Object.freeze({
2
- USER: "User",
3
- BRAND: "Brand",
4
- CATEGORY: "Category",
5
- PRODUCT_VARIANT: "ProductVariant",
6
- BANNER: "Banner",
7
- FEEDBACK:"Feedback",
8
- NOTIFICATION: 'Notification',
9
- TENANT_SETTINGS: 'TenantSettings',
10
- });
11
-
1
+ const EntityTypeEnum = Object.freeze({
2
+ USER: "User",
3
+ BRAND: "Brand",
4
+ CATEGORY: "Category",
5
+ PRODUCT_VARIANT: "ProductVariant",
6
+ BANNER: "Banner",
7
+ FEEDBACK:"Feedback",
8
+ NOTIFICATION: 'Notification',
9
+ TENANT_SETTINGS: 'TenantSettings',
10
+ REASON: 'Reason'
11
+ });
12
+
12
13
  module.exports = EntityTypeEnum;
@@ -1,7 +1,7 @@
1
- const FeatureTypeEnum = Object.freeze({
2
- BOOLEAN: "Boolean",
3
- LIMIT: "Limit",
4
- METERED: "Metered"
5
- });
6
-
1
+ const FeatureTypeEnum = Object.freeze({
2
+ BOOLEAN: "Boolean",
3
+ LIMIT: "Limit",
4
+ METERED: "Metered"
5
+ });
6
+
7
7
  module.exports = FeatureTypeEnum;
@@ -1,7 +1,7 @@
1
- const GenderEnum = Object.freeze({
2
- MALE: "Male",
3
- FEMALE: "Female",
4
- OTHER: "Other"
5
- });
6
- module.exports = GenderEnum;
7
-
1
+ const GenderEnum = Object.freeze({
2
+ MALE: "Male",
3
+ FEMALE: "Female",
4
+ OTHER: "Other"
5
+ });
6
+ module.exports = GenderEnum;
7
+
@@ -1,6 +1,6 @@
1
- const NotificationStatusEnum = Object.freeze({
2
- SENT: "Sent",
3
- FAILED: "Failed",
4
- PENDING: "Pending"
5
- });
1
+ const NotificationStatusEnum = Object.freeze({
2
+ SENT: "Sent",
3
+ FAILED: "Failed",
4
+ PENDING: "Pending"
5
+ });
6
6
  module.exports = NotificationStatusEnum;
@@ -1,10 +1,10 @@
1
- const NotificationTypeEnum = Object.freeze({
2
-
3
- DYNAMIC: "Dynamic",
4
- PUSH: "Push",
5
- EMAIL: "Email",
6
- SMS: "Sms"
7
-
8
- });
9
-
1
+ const NotificationTypeEnum = Object.freeze({
2
+
3
+ DYNAMIC: "Dynamic",
4
+ PUSH: "Push",
5
+ EMAIL: "Email",
6
+ SMS: "Sms"
7
+
8
+ });
9
+
10
10
  module.exports = NotificationTypeEnum;
@@ -1,7 +1,7 @@
1
- const OrderActionStatusEnum = Object.freeze({
2
- PENDING: "Pending",
3
- APPROVED: "Approved",
4
- REJECTED: "Rejected",
5
- COMPLETED: "Completed"
6
- });
7
- module.exports = OrderActionStatusEnum;
1
+ const OrderActionStatusEnum = Object.freeze({
2
+ PENDING: "Pending",
3
+ APPROVED: "Approved",
4
+ REJECTED: "Rejected",
5
+ COMPLETED: "Completed"
6
+ });
7
+ module.exports = OrderActionStatusEnum;
@@ -1,8 +1,8 @@
1
- const OrderStatusEnum = Object.freeze({
2
- PENDING: "Pending",
3
- PROCESSING: "Processing",
4
- SHIPPED: "Shipped",
5
- DELIVERED: "Delivered",
6
- CANCELLED: "Cancelled"
7
- });
1
+ const OrderStatusEnum = Object.freeze({
2
+ PENDING: "Pending",
3
+ PROCESSING: "Processing",
4
+ SHIPPED: "Shipped",
5
+ DELIVERED: "Delivered",
6
+ CANCELLED: "Cancelled"
7
+ });
8
8
  module.exports = OrderStatusEnum;
@@ -1,7 +1,7 @@
1
- const PackageBoxTypeEnum = Object.freeze({
2
- BOX: "Box",
3
- ENVELOPE: "Envelope",
4
- SOFT_PACKAGE: "Soft Package"
5
- });
6
-
1
+ const PackageBoxTypeEnum = Object.freeze({
2
+ BOX: "Box",
3
+ ENVELOPE: "Envelope",
4
+ SOFT_PACKAGE: "Soft Package"
5
+ });
6
+
7
7
  module.exports = PackageBoxTypeEnum;
@@ -1,7 +1,7 @@
1
- const PaymentMethodEnum = Object.freeze({
2
- NET_BANKING: "NetBanking",
3
- UPI: "UPI",
4
- WALLET: "Wallet",
5
- CARD: "Card",
6
- });
1
+ const PaymentMethodEnum = Object.freeze({
2
+ NET_BANKING: "NetBanking",
3
+ UPI: "UPI",
4
+ WALLET: "Wallet",
5
+ CARD: "Card",
6
+ });
7
7
  module.exports = PaymentMethodEnum;
@@ -1,7 +1,7 @@
1
- const PaymentStatusEnum = Object.freeze({
2
- PENDING: "Pending",
3
- PAID: "Paid",
4
- FAILED: "Failed",
5
- REFUNDED: "Refunded"
6
- });
1
+ const PaymentStatusEnum = Object.freeze({
2
+ PENDING: "Pending",
3
+ PAID: "Paid",
4
+ FAILED: "Failed",
5
+ REFUNDED: "Refunded"
6
+ });
7
7
  module.exports = PaymentStatusEnum;
@@ -1,7 +1,7 @@
1
- const PaymentTypeEnum = Object.freeze({
2
- CASH_ON_DELIVERY: "Cash On Delivery",
3
- RAZORPAY: "Razorpay",
4
- JUSPAY: "Juspay",
5
- PAY_U: "PayU"
6
- });
1
+ const PaymentTypeEnum = Object.freeze({
2
+ CASH_ON_DELIVERY: "Cash On Delivery",
3
+ RAZORPAY: "Razorpay",
4
+ JUSPAY: "Juspay",
5
+ PAY_U: "PayU"
6
+ });
7
7
  module.exports = PaymentTypeEnum;
@@ -1,5 +1,5 @@
1
- const PlatformEnum = Object.freeze({
2
- ANDROID: "Android",
3
- IOS: "Ios"
4
- });
1
+ const PlatformEnum = Object.freeze({
2
+ ANDROID: "Android",
3
+ IOS: "Ios"
4
+ });
5
5
  module.exports = PlatformEnum;
@@ -1,7 +1,7 @@
1
- const ReasonTypeEnum = Object.freeze({
2
- RETURN: "Return",
3
- CANCEL: "Cancel",
4
- REPLACE: "Replace"
5
- });
6
-
1
+ const ReasonTypeEnum = Object.freeze({
2
+ RETURN: "Return",
3
+ CANCEL: "Cancel",
4
+ REPLACE: "Replace"
5
+ });
6
+
7
7
  module.exports = ReasonTypeEnum;
@@ -1,6 +1,6 @@
1
- const RegistrationStatusEnum = Object.freeze({
2
- INITIATED: "Initiated",
3
- VERIFIED: "Verified",
4
- COMPLETED: "Completed"
5
- });
1
+ const RegistrationStatusEnum = Object.freeze({
2
+ INITIATED: "Initiated",
3
+ VERIFIED: "Verified",
4
+ COMPLETED: "Completed"
5
+ });
6
6
  module.exports = RegistrationStatusEnum;
@@ -1,8 +1,8 @@
1
- const SortByEnum = Object.freeze({
2
- LOW_TO_HIGH: "lowToHigh",
3
- HIGH_TO_LOW: "highToLow",
4
- DISCOUNT: "discount",
5
- NEW_ARRIVAL: "newArrival",
6
- CUSTOMER_RATING: "customerRating"
7
- });
1
+ const SortByEnum = Object.freeze({
2
+ LOW_TO_HIGH: "lowToHigh",
3
+ HIGH_TO_LOW: "highToLow",
4
+ DISCOUNT: "discount",
5
+ NEW_ARRIVAL: "newArrival",
6
+ CUSTOMER_RATING: "customerRating"
7
+ });
8
8
  module.exports = SortByEnum;
@@ -1,8 +1,8 @@
1
- const SubscriptionStatusEnum = Object.freeze({
2
- ACTIVE: "Active",
3
- CANCELLED: "Cancelled",
4
- SUSPENDED: "Suspended",
5
- EXPIRED: "Expired"
6
- });
7
-
1
+ const SubscriptionStatusEnum = Object.freeze({
2
+ ACTIVE: "Active",
3
+ CANCELLED: "Cancelled",
4
+ SUSPENDED: "Suspended",
5
+ EXPIRED: "Expired"
6
+ });
7
+
8
8
  module.exports = SubscriptionStatusEnum;
package/index.js CHANGED
@@ -1,28 +1,28 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
- const initializeModels = require('./dbconnection/Connect');
4
- const SubscriptionAbstractController = require('./controller/SubscriptionAbstractController');
5
- const TenantAbstractController = require('./controller/TenantAbstractController');
6
- const TenantSettingsAbstractController = require('./controller/TenantSettingsAbstractController');
7
- const LocationController = require('./controller/LocationController');
8
- const CommonAppConstants = require('./constants/AppConstants');
9
- const CommonStatusMessage = require('./constants/StatusMessageConstants');
10
- const QueryBuilder = require('./scripts/QueryBuilder');
11
- const enums = {};
12
- const enumDir = path.join(__dirname, 'enum');
13
- fs.readdirSync(enumDir).forEach((file) => {
14
- if (file.endsWith('.js')) {
15
- const enumName = path.basename(file, '.js');
16
- enums[enumName] = require(path.join(enumDir, file));
17
- }
18
- });
19
- const utils = {};
20
- const utilDir = path.join(__dirname, 'utility');
21
- fs.readdirSync(utilDir).forEach((file) => {
22
- if(file.endsWith('.js')){
23
- const utilName = path.basename(file, '.js');
24
- utils[utilName] = require(path.join(utilDir, file));
25
- }
26
- })
27
-
28
- module.exports = {initializeModels, enums, utils, CommonAppConstants, CommonStatusMessage, SubscriptionAbstractController, TenantAbstractController, TenantSettingsAbstractController, LocationController, QueryBuilder};
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+ const initializeModels = require('./dbconnection/Connect');
4
+ const SubscriptionAbstractController = require('./controller/SubscriptionAbstractController');
5
+ const TenantAbstractController = require('./controller/TenantAbstractController');
6
+ const TenantSettingsAbstractController = require('./controller/TenantSettingsAbstractController');
7
+ const LocationController = require('./controller/LocationController');
8
+ const CommonAppConstants = require('./constants/AppConstants');
9
+ const CommonStatusMessage = require('./constants/StatusMessageConstants');
10
+ const QueryBuilder = require('./scripts/QueryBuilder');
11
+ const enums = {};
12
+ const enumDir = path.join(__dirname, 'enum');
13
+ fs.readdirSync(enumDir).forEach((file) => {
14
+ if (file.endsWith('.js')) {
15
+ const enumName = path.basename(file, '.js');
16
+ enums[enumName] = require(path.join(enumDir, file));
17
+ }
18
+ });
19
+ const utils = {};
20
+ const utilDir = path.join(__dirname, 'utility');
21
+ fs.readdirSync(utilDir).forEach((file) => {
22
+ if(file.endsWith('.js')){
23
+ const utilName = path.basename(file, '.js');
24
+ utils[utilName] = require(path.join(utilDir, file));
25
+ }
26
+ })
27
+
28
+ module.exports = {initializeModels, enums, utils, CommonAppConstants, CommonStatusMessage, SubscriptionAbstractController, TenantAbstractController, TenantSettingsAbstractController, LocationController, QueryBuilder};
package/model/Address.js CHANGED
@@ -1,96 +1,96 @@
1
- const { DataTypes } = require('sequelize');
2
- const AddressTypeEnum = require('../enum/AddressTypeEnum');
3
- module.exports = (sequelize) => {
4
- return sequelize.define('Address', {
5
- AddressID: {
6
- type: DataTypes.UUID,
7
- primaryKey: true,
8
- allowNull: false,
9
- defaultValue: DataTypes.UUIDV4
10
- },
11
- TenantID: {
12
- type: DataTypes.UUID,
13
- allowNull: false,
14
- references: {
15
- model: 'Tenant',
16
- key: 'TenantID'
17
- },
18
- onDelete: 'CASCADE',
19
- onUpdate: 'CASCADE'
20
- },
21
- CustomerID: {
22
- type: DataTypes.UUID,
23
- allowNull: false,
24
- references: {
25
- model: 'Customer',
26
- key: 'CustomerID'
27
- },
28
- onDelete: 'CASCADE',
29
- onUpdate: 'CASCADE'
30
- },
31
- AddressLine1: {
32
- type: DataTypes.STRING(255),
33
- allowNull: false
34
- },
35
- AddressLine2: {
36
- type: DataTypes.STRING(255)
37
- },
38
- CityName: {
39
- type: DataTypes.STRING(100),
40
- allowNull: false,
41
- },
42
- StateCode: {
43
- type:DataTypes.STRING(3),
44
- allowNull:false
45
- },
46
- CountryCode:{
47
- type:DataTypes.CHAR(2),
48
- allowNull:false
49
- },
50
- Zipcode: {
51
- type: DataTypes.STRING(20),
52
- allowNull: false
53
- },
54
- AddressType: {
55
- type: DataTypes.ENUM(Object.values(AddressTypeEnum)),
56
- allowNull: false
57
- },
58
- RecipientName: {
59
- type: DataTypes.STRING(255),
60
- allowNull: false
61
- },
62
- CountryCallingCode: {
63
- type: DataTypes.STRING(5),
64
- allowNull: false
65
- },
66
- PhoneNumber: {
67
- type: DataTypes.STRING(20),
68
- allowNull: false
69
- },
70
- IsDefault: {
71
- type: DataTypes.BOOLEAN,
72
- defaultValue: false
73
- },
74
- CreatedBy: {
75
- type: DataTypes.UUID,
76
- allowNull: false
77
- },
78
- CreatedAt: {
79
- type: DataTypes.DATE,
80
- allowNull: false,
81
- defaultValue: DataTypes.NOW
82
- },
83
- UpdatedBy: {
84
- type: DataTypes.UUID,
85
- allowNull: false
86
- },
87
- UpdatedAt: {
88
- type: DataTypes.DATE,
89
- allowNull: false,
90
- defaultValue: DataTypes.NOW
91
- }
92
- }, {
93
- tableName: 'Address',
94
- timestamps: false
95
- });
1
+ const { DataTypes } = require('sequelize');
2
+ const AddressTypeEnum = require('../enum/AddressTypeEnum');
3
+ module.exports = (sequelize) => {
4
+ return sequelize.define('Address', {
5
+ AddressID: {
6
+ type: DataTypes.UUID,
7
+ primaryKey: true,
8
+ allowNull: false,
9
+ defaultValue: DataTypes.UUIDV4
10
+ },
11
+ TenantID: {
12
+ type: DataTypes.UUID,
13
+ allowNull: false,
14
+ references: {
15
+ model: 'Tenant',
16
+ key: 'TenantID'
17
+ },
18
+ onDelete: 'CASCADE',
19
+ onUpdate: 'CASCADE'
20
+ },
21
+ CustomerID: {
22
+ type: DataTypes.UUID,
23
+ allowNull: false,
24
+ references: {
25
+ model: 'Customer',
26
+ key: 'CustomerID'
27
+ },
28
+ onDelete: 'CASCADE',
29
+ onUpdate: 'CASCADE'
30
+ },
31
+ AddressLine1: {
32
+ type: DataTypes.STRING(255),
33
+ allowNull: false
34
+ },
35
+ AddressLine2: {
36
+ type: DataTypes.STRING(255)
37
+ },
38
+ CityName: {
39
+ type: DataTypes.STRING(100),
40
+ allowNull: false,
41
+ },
42
+ StateCode: {
43
+ type:DataTypes.STRING(3),
44
+ allowNull:false
45
+ },
46
+ CountryCode:{
47
+ type:DataTypes.CHAR(2),
48
+ allowNull:false
49
+ },
50
+ Zipcode: {
51
+ type: DataTypes.STRING(20),
52
+ allowNull: false
53
+ },
54
+ AddressType: {
55
+ type: DataTypes.ENUM(Object.values(AddressTypeEnum)),
56
+ allowNull: false
57
+ },
58
+ RecipientName: {
59
+ type: DataTypes.STRING(255),
60
+ allowNull: false
61
+ },
62
+ CountryCallingCode: {
63
+ type: DataTypes.STRING(5),
64
+ allowNull: false
65
+ },
66
+ PhoneNumber: {
67
+ type: DataTypes.STRING(20),
68
+ allowNull: false
69
+ },
70
+ IsDefault: {
71
+ type: DataTypes.BOOLEAN,
72
+ defaultValue: false
73
+ },
74
+ CreatedBy: {
75
+ type: DataTypes.UUID,
76
+ allowNull: false
77
+ },
78
+ CreatedAt: {
79
+ type: DataTypes.DATE,
80
+ allowNull: false,
81
+ defaultValue: DataTypes.NOW
82
+ },
83
+ UpdatedBy: {
84
+ type: DataTypes.UUID,
85
+ allowNull: false
86
+ },
87
+ UpdatedAt: {
88
+ type: DataTypes.DATE,
89
+ allowNull: false,
90
+ defaultValue: DataTypes.NOW
91
+ }
92
+ }, {
93
+ tableName: 'Address',
94
+ timestamps: false
95
+ });
96
96
  };