datatype chaged for description and product name
This commit is contained in:
parent
87f9b87a0d
commit
5934130888
@ -29,11 +29,11 @@ module.exports = (sequelize, DataTypes) => {
|
|||||||
allowNull: true,
|
allowNull: true,
|
||||||
},
|
},
|
||||||
description: {
|
description: {
|
||||||
type: DataTypes.STRING,
|
type: DataTypes.STRING(1000),
|
||||||
allowNull: true,
|
allowNull: true,
|
||||||
validate: {
|
validate: {
|
||||||
len: {
|
len: {
|
||||||
args: [0, 1000],
|
args: [1, 1000],
|
||||||
msg: "Description is too long. Maximum allowed length is 1000 characters."
|
msg: "Description is too long. Maximum allowed length is 1000 characters."
|
||||||
}}
|
}}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -6,12 +6,12 @@ module.exports = (sequelize, DataTypes) => {
|
|||||||
primaryKey: true,
|
primaryKey: true,
|
||||||
},
|
},
|
||||||
product_name: {
|
product_name: {
|
||||||
type: DataTypes.TEXT,
|
type: DataTypes.STRING(1000),
|
||||||
allowNull: false,
|
allowNull: false,
|
||||||
unique: true,
|
unique: true,
|
||||||
validate: {
|
validate: {
|
||||||
len: {
|
len: {
|
||||||
args: [0, 1000],
|
args: [1, 1000],
|
||||||
msg: "Product Name is too long. Maximum allowed length is 1000 characters."
|
msg: "Product Name is too long. Maximum allowed length is 1000 characters."
|
||||||
}}
|
}}
|
||||||
},
|
},
|
||||||
@ -26,11 +26,11 @@ module.exports = (sequelize, DataTypes) => {
|
|||||||
}}
|
}}
|
||||||
},
|
},
|
||||||
hs_description: {
|
hs_description: {
|
||||||
type: DataTypes.TEXT,
|
type: DataTypes.STRING(1000),
|
||||||
allowNull: true,
|
allowNull: true,
|
||||||
validate: {
|
validate: {
|
||||||
len: {
|
len: {
|
||||||
args: [0, 1000],
|
args: [1, 1000],
|
||||||
msg: "HS Description is too long. Maximum allowed length is 1000 characters."
|
msg: "HS Description is too long. Maximum allowed length is 1000 characters."
|
||||||
}}
|
}}
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user