mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-18 19:59:20 +00:00
feat: added settings api on beackend
This commit is contained in:
24
backend/src/models/Setting.js
Normal file
24
backend/src/models/Setting.js
Normal file
@@ -0,0 +1,24 @@
|
||||
const Sequelize = require("sequelize");
|
||||
|
||||
class Setting extends Sequelize.Model {
|
||||
static init(sequelize) {
|
||||
super.init(
|
||||
{
|
||||
key: {
|
||||
type: Sequelize.STRING,
|
||||
primaryKey: true,
|
||||
allowNull: false,
|
||||
unique: true,
|
||||
},
|
||||
value: { type: Sequelize.TEXT, allowNull: false },
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
}
|
||||
);
|
||||
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Setting;
|
||||
Reference in New Issue
Block a user