2021-05-15 19:33:59 +03:00
|
|
|
const { DataTypes } = require('sequelize');
|
|
|
|
const { sequelize } = require('../db');
|
|
|
|
|
2021-10-05 13:29:17 +03:00
|
|
|
const Config = sequelize.define(
|
|
|
|
'Config',
|
|
|
|
{
|
|
|
|
key: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: false,
|
|
|
|
unique: true,
|
|
|
|
},
|
|
|
|
value: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: false,
|
|
|
|
},
|
|
|
|
valueType: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: false,
|
|
|
|
},
|
|
|
|
isLocked: {
|
|
|
|
type: DataTypes.TINYINT,
|
|
|
|
defaultValue: 0,
|
|
|
|
},
|
2021-05-15 19:33:59 +03:00
|
|
|
},
|
2021-10-05 13:29:17 +03:00
|
|
|
{
|
|
|
|
tableName: 'config',
|
2021-05-15 19:33:59 +03:00
|
|
|
}
|
2021-10-05 13:29:17 +03:00
|
|
|
);
|
2021-05-15 19:33:59 +03:00
|
|
|
|
2021-10-05 13:29:17 +03:00
|
|
|
module.exports = Config;
|