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.

73 lines
1.4 KiB
JavaScript

const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
return sequelize.define('facility', {
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
},
type: {
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
},
symbol: {
type: DataTypes.STRING(100),
allowNull: true
},
tooltip: {
type: DataTypes.STRING(1000),
allowNull: true
}
}, {
sequelize,
tableName: 'facility',
timestamps: false,
indexes: [
{
name: "PRIMARY",
unique: true,
using: "BTREE",
fields: [
{ name: "sn" },
]
},
{
name: "facility_hotel_id_IDX",
using: "BTREE",
fields: [
{ name: "hotel_id" },
]
},
]
});
};