24 lines
532 B
JavaScript
24 lines
532 B
JavaScript
const sequelize = require('../db');
|
|
const {DataTypes} = require('sequelize');
|
|
|
|
const Block = sequelize.define('block', {
|
|
telegram_id: {
|
|
type: DataTypes.BIGINT,
|
|
allowNull: false,
|
|
},
|
|
isBlocked: {
|
|
type: DataTypes.BOOLEAN,
|
|
defaultValue: true,
|
|
},
|
|
reason: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
},
|
|
time: {
|
|
type: DataTypes.BIGINT, // UNIX-время окончания блокировки
|
|
allowNull: false,
|
|
}
|
|
})
|
|
|
|
module.exports = Block;
|