@b2y/ecommerce-common 1.0.4 → 1.0.6

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 (67) hide show
  1. package/README.md +4 -4
  2. package/constants/AppConstants.js +3 -3
  3. package/constants/ReportConstants.js +14 -14
  4. package/constants/StatusMessageConstants.js +17 -17
  5. package/dbconnection/Connect.js +379 -379
  6. package/enum/AddressTypeEnum.js +6 -6
  7. package/enum/BooleanEnum.js +4 -4
  8. package/enum/EntityTypeEnum.js +11 -11
  9. package/enum/GenderEnum.js +7 -7
  10. package/enum/NotificationStatusEnum.js +5 -5
  11. package/enum/NotificationTypeEnum.js +9 -9
  12. package/enum/OrderStatusEnum.js +7 -7
  13. package/enum/PaymentMethodEnum.js +6 -6
  14. package/enum/PaymentStatusEnum.js +6 -6
  15. package/enum/PaymentTypeEnum.js +6 -6
  16. package/enum/PlatformEnum.js +4 -4
  17. package/enum/RegistrationStatusEnum.js +5 -5
  18. package/enum/SortByEnum.js +7 -7
  19. package/index.js +22 -22
  20. package/model/Address.js +95 -95
  21. package/model/AttributeType.js +50 -50
  22. package/model/AttributeValue.js +64 -64
  23. package/model/Banner.js +78 -78
  24. package/model/Brand.js +76 -76
  25. package/model/Cart.js +76 -76
  26. package/model/Category.js +72 -72
  27. package/model/CategoryAttributeType.js +62 -62
  28. package/model/Colour.js +52 -52
  29. package/model/Customer.js +94 -94
  30. package/model/DeviceToken.js +51 -51
  31. package/model/Document.js +70 -70
  32. package/model/DynamicUIComponent.js +52 -52
  33. package/model/Feedback.js +79 -79
  34. package/model/Inventory.js +83 -83
  35. package/model/NotificationHistory.js +67 -67
  36. package/model/Order.js +94 -94
  37. package/model/OrderItem.js +98 -98
  38. package/model/OrderItemHistory.js +69 -69
  39. package/model/OrderStatus.js +48 -48
  40. package/model/Payment.js +101 -101
  41. package/model/PaymentMethod.js +36 -36
  42. package/model/PaymentStatus.js +36 -36
  43. package/model/PaymentType.js +36 -36
  44. package/model/Permission.js +55 -55
  45. package/model/Product.js +82 -82
  46. package/model/ProductGroup.js +48 -48
  47. package/model/ProductSpecification.js +65 -65
  48. package/model/ProductVariant.js +75 -75
  49. package/model/ProductVariantAttribute.js +58 -58
  50. package/model/Role.js +61 -61
  51. package/model/RolePermissionMapping.js +63 -63
  52. package/model/SpecificationType.js +41 -41
  53. package/model/Store.js +99 -99
  54. package/model/StoreUserMapping.js +44 -44
  55. package/model/Tenant.js +91 -91
  56. package/model/TenantSettings.js +47 -47
  57. package/model/User.js +132 -132
  58. package/model/WishList.js +62 -62
  59. package/package.json +28 -28
  60. package/utility/AppUtil.js +65 -57
  61. package/utility/DateUtil.js +55 -55
  62. package/utility/ExcelUtil.js +125 -125
  63. package/utility/LocationUtility.js +130 -130
  64. package/utility/OrderTimeFilterUtil.js +87 -87
  65. package/utility/QueryUtil.js +261 -261
  66. package/utility/Razorpay.js +65 -65
  67. package/utility/VariantPriceUtil.js +54 -54
@@ -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,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,12 +1,12 @@
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
+ });
11
+
12
12
  module.exports = EntityTypeEnum;
@@ -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,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 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,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;
package/index.js CHANGED
@@ -1,22 +1,22 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
- const initializeModels = require('./dbconnection/Connect');
4
-
5
- const enums = {};
6
- const enumDir = path.join(__dirname, 'enum');
7
- fs.readdirSync(enumDir).forEach((file) => {
8
- if (file.endsWith('.js')) {
9
- const enumName = path.basename(file, '.js');
10
- enums[enumName] = require(path.join(enumDir, file));
11
- }
12
- });
13
- const utils = {};
14
- const utilDir = path.join(__dirname, 'utility');
15
- fs.readdirSync(utilDir).forEach((file) => {
16
- if(file.endsWith('.js')){
17
- const utilName = path.basename(file, '.js');
18
- utils[utilName] = require(path.join(utilDir, file));
19
- }
20
- })
21
-
22
- module.exports = {initializeModels, enums, utils}
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+ const initializeModels = require('./dbconnection/Connect');
4
+
5
+ const enums = {};
6
+ const enumDir = path.join(__dirname, 'enum');
7
+ fs.readdirSync(enumDir).forEach((file) => {
8
+ if (file.endsWith('.js')) {
9
+ const enumName = path.basename(file, '.js');
10
+ enums[enumName] = require(path.join(enumDir, file));
11
+ }
12
+ });
13
+ const utils = {};
14
+ const utilDir = path.join(__dirname, 'utility');
15
+ fs.readdirSync(utilDir).forEach((file) => {
16
+ if(file.endsWith('.js')){
17
+ const utilName = path.basename(file, '.js');
18
+ utils[utilName] = require(path.join(utilDir, file));
19
+ }
20
+ })
21
+
22
+ module.exports = {initializeModels, enums, utils}
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
- CountryCode: {
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
  };
@@ -1,51 +1,51 @@
1
- const { DataTypes } = require('sequelize');
2
-
3
- module.exports = (sequelize) => {
4
- return sequelize.define('AttributeType', {
5
- AttributeTypeID: {
6
- type: DataTypes.UUID,
7
- primaryKey: true,
8
- allowNull: false,
9
- defaultValue: DataTypes.UUIDV4
10
- },
11
- Name: {
12
- type: DataTypes.STRING(100),
13
- allowNull: false
14
- },
15
- AttributeTypeDescription: {
16
- type: DataTypes.TEXT
17
- },
18
- IsActive: {
19
- type: DataTypes.BOOLEAN,
20
- defaultValue: true
21
- },
22
- CreatedBy: {
23
- type: DataTypes.UUID,
24
- allowNull: false
25
- },
26
- CreatedAt: {
27
- type: DataTypes.DATE,
28
- allowNull: false,
29
- defaultValue: DataTypes.NOW
30
- },
31
- UpdatedBy: {
32
- type: DataTypes.UUID,
33
- allowNull: false
34
- },
35
- UpdatedAt: {
36
- type: DataTypes.DATE,
37
- allowNull: false,
38
- defaultValue: DataTypes.NOW
39
- }
40
- }, {
41
- tableName: 'AttributeType',
42
- indexes: [
43
- {
44
- name: "idx_attributetype_name_lower_unique",
45
- unique: true,
46
- fields: sequelize.literal('LOWER("Name")')
47
- }
48
- ],
49
- timestamps: false
50
- });
1
+ const { DataTypes } = require('sequelize');
2
+
3
+ module.exports = (sequelize) => {
4
+ return sequelize.define('AttributeType', {
5
+ AttributeTypeID: {
6
+ type: DataTypes.UUID,
7
+ primaryKey: true,
8
+ allowNull: false,
9
+ defaultValue: DataTypes.UUIDV4
10
+ },
11
+ Name: {
12
+ type: DataTypes.STRING(100),
13
+ allowNull: false
14
+ },
15
+ AttributeTypeDescription: {
16
+ type: DataTypes.TEXT
17
+ },
18
+ IsActive: {
19
+ type: DataTypes.BOOLEAN,
20
+ defaultValue: true
21
+ },
22
+ CreatedBy: {
23
+ type: DataTypes.UUID,
24
+ allowNull: false
25
+ },
26
+ CreatedAt: {
27
+ type: DataTypes.DATE,
28
+ allowNull: false,
29
+ defaultValue: DataTypes.NOW
30
+ },
31
+ UpdatedBy: {
32
+ type: DataTypes.UUID,
33
+ allowNull: false
34
+ },
35
+ UpdatedAt: {
36
+ type: DataTypes.DATE,
37
+ allowNull: false,
38
+ defaultValue: DataTypes.NOW
39
+ }
40
+ }, {
41
+ tableName: 'AttributeType',
42
+ indexes: [
43
+ {
44
+ name: "idx_attributetype_name_lower_unique",
45
+ unique: true,
46
+ fields: sequelize.literal('LOWER("Name")')
47
+ }
48
+ ],
49
+ timestamps: false
50
+ });
51
51
  };
@@ -1,65 +1,65 @@
1
- const { DataTypes } = require('sequelize');
2
-
3
- module.exports = (sequelize) => {
4
- return sequelize.define('AttributeValue', {
5
- AttributeValueID: {
6
- type: DataTypes.UUID,
7
- primaryKey: true,
8
- allowNull: false,
9
- defaultValue: DataTypes.UUIDV4
10
- },
11
- AttributeTypeID: {
12
- type: DataTypes.UUID,
13
- allowNull: false,
14
- references: {
15
- model: 'AttributeType',
16
- key: 'AttributeTypeID'
17
- },
18
- onDelete: 'RESTRICT',
19
- onUpdate: 'CASCADE'
20
- },
21
- Value: {
22
- type: DataTypes.STRING(100),
23
- allowNull: false
24
- },
25
- Unit: {
26
- type: DataTypes.STRING(50)
27
- },
28
- IsActive: {
29
- type: DataTypes.BOOLEAN,
30
- defaultValue: true
31
- },
32
- CreatedBy: {
33
- type: DataTypes.UUID,
34
- allowNull: false
35
- },
36
- CreatedAt: {
37
- type: DataTypes.DATE,
38
- allowNull: false,
39
- defaultValue: DataTypes.NOW
40
- },
41
- UpdatedBy: {
42
- type: DataTypes.UUID,
43
- allowNull: false
44
- },
45
- UpdatedAt: {
46
- type: DataTypes.DATE,
47
- allowNull: false,
48
- defaultValue: DataTypes.NOW
49
- }
50
- }, {
51
- tableName: 'AttributeValue',
52
- indexes: [
53
- {
54
- name: "idx_attribute_unique_composite",
55
- unique: true,
56
- fields: [
57
- "AttributeTypeID",
58
- sequelize.literal('LOWER("Value")'),
59
- sequelize.literal('LOWER("Unit")')
60
- ]
61
- }
62
- ],
63
- timestamps: false
64
- });
1
+ const { DataTypes } = require('sequelize');
2
+
3
+ module.exports = (sequelize) => {
4
+ return sequelize.define('AttributeValue', {
5
+ AttributeValueID: {
6
+ type: DataTypes.UUID,
7
+ primaryKey: true,
8
+ allowNull: false,
9
+ defaultValue: DataTypes.UUIDV4
10
+ },
11
+ AttributeTypeID: {
12
+ type: DataTypes.UUID,
13
+ allowNull: false,
14
+ references: {
15
+ model: 'AttributeType',
16
+ key: 'AttributeTypeID'
17
+ },
18
+ onDelete: 'RESTRICT',
19
+ onUpdate: 'CASCADE'
20
+ },
21
+ Value: {
22
+ type: DataTypes.STRING(100),
23
+ allowNull: false
24
+ },
25
+ Unit: {
26
+ type: DataTypes.STRING(50)
27
+ },
28
+ IsActive: {
29
+ type: DataTypes.BOOLEAN,
30
+ defaultValue: true
31
+ },
32
+ CreatedBy: {
33
+ type: DataTypes.UUID,
34
+ allowNull: false
35
+ },
36
+ CreatedAt: {
37
+ type: DataTypes.DATE,
38
+ allowNull: false,
39
+ defaultValue: DataTypes.NOW
40
+ },
41
+ UpdatedBy: {
42
+ type: DataTypes.UUID,
43
+ allowNull: false
44
+ },
45
+ UpdatedAt: {
46
+ type: DataTypes.DATE,
47
+ allowNull: false,
48
+ defaultValue: DataTypes.NOW
49
+ }
50
+ }, {
51
+ tableName: 'AttributeValue',
52
+ indexes: [
53
+ {
54
+ name: "idx_attribute_unique_composite",
55
+ unique: true,
56
+ fields: [
57
+ "AttributeTypeID",
58
+ sequelize.literal('LOWER("Value")'),
59
+ sequelize.literal('LOWER("Unit")')
60
+ ]
61
+ }
62
+ ],
63
+ timestamps: false
64
+ });
65
65
  };