You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.2 KiB
JavaScript
65 lines
1.2 KiB
JavaScript
const Sequelize = require('sequelize');
|
|
module.exports = function(sequelize, DataTypes) {
|
|
return sequelize.define('informations', {
|
|
sn: {
|
|
autoIncrement: true,
|
|
type: DataTypes.BIGINT,
|
|
allowNull: false,
|
|
primaryKey: true
|
|
},
|
|
hotel_id: {
|
|
type: DataTypes.BIGINT,
|
|
allowNull: false
|
|
},
|
|
lgc: {
|
|
type: DataTypes.TINYINT,
|
|
allowNull: false
|
|
},
|
|
locale: {
|
|
type: DataTypes.STRING(100),
|
|
allowNull: true
|
|
},
|
|
category: {
|
|
type: DataTypes.STRING(100),
|
|
allowNull: true
|
|
},
|
|
category_name: {
|
|
type: DataTypes.STRING(100),
|
|
allowNull: true
|
|
},
|
|
id: {
|
|
type: DataTypes.STRING(100),
|
|
allowNull: true
|
|
},
|
|
name: {
|
|
type: DataTypes.STRING(100),
|
|
allowNull: true
|
|
},
|
|
value: {
|
|
type: DataTypes.STRING(1000),
|
|
allowNull: true
|
|
}
|
|
}, {
|
|
sequelize,
|
|
tableName: 'informations',
|
|
timestamps: false,
|
|
indexes: [
|
|
{
|
|
name: "PRIMARY",
|
|
unique: true,
|
|
using: "BTREE",
|
|
fields: [
|
|
{ name: "sn" },
|
|
]
|
|
},
|
|
{
|
|
name: "facility_hotel_id_IDX",
|
|
using: "BTREE",
|
|
fields: [
|
|
{ name: "hotel_id" },
|
|
]
|
|
},
|
|
]
|
|
});
|
|
};
|