27 lines
428 B
JavaScript
27 lines
428 B
JavaScript
/**
|
|
* Settings schema
|
|
*/
|
|
module.exports = (sequelize, DataTypes) => {
|
|
let settingSchema = sequelize.define('setting', {
|
|
key: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false
|
|
},
|
|
config: {
|
|
type: DataTypes.JSON,
|
|
allowNull: false
|
|
}
|
|
}, {
|
|
timestamps: true,
|
|
version: true,
|
|
indexes: [
|
|
{
|
|
unique: true,
|
|
fields: ['key']
|
|
}
|
|
]
|
|
})
|
|
|
|
return settingSchema
|
|
}
|