mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-19 19:49:37 +02:00
Config model and controllers
This commit is contained in:
parent
873faa6c97
commit
3fc3d07598
5 changed files with 144 additions and 1 deletions
26
models/Config.js
Normal file
26
models/Config.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
const { DataTypes } = require('sequelize');
|
||||
const { sequelize } = require('../db');
|
||||
|
||||
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.BOOLEAN,
|
||||
defaultValue: false
|
||||
}
|
||||
}, {
|
||||
freezeTableName: true
|
||||
});
|
||||
|
||||
module.exports = Config;
|
Loading…
Add table
Add a link
Reference in a new issue