mirror of
https://github.com/Troplo/Colubrina.git
synced 2024-11-22 19:27:55 +11:00
48 lines
1 KiB
JavaScript
48 lines
1 KiB
JavaScript
"use strict"
|
|
const { Model } = require("sequelize")
|
|
module.exports = (sequelize, DataTypes) => {
|
|
class Invite extends Model {
|
|
/**
|
|
* Helper method for defining associations.
|
|
* This method is not a part of Sequelize lifecycle.
|
|
* The `models/index` file will call this method automatically.
|
|
*/
|
|
// eslint-disable-next-line no-unused-vars
|
|
static associate(models) {
|
|
// define association here
|
|
}
|
|
}
|
|
Invite.init(
|
|
{
|
|
invite: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false
|
|
},
|
|
chatId: {
|
|
type: DataTypes.BIGINT,
|
|
allowNull: false
|
|
},
|
|
userId: {
|
|
type: DataTypes.BIGINT,
|
|
allowNull: false
|
|
},
|
|
expiresAt: {
|
|
type: DataTypes.DATE,
|
|
allowNull: false
|
|
},
|
|
createdAt: {
|
|
allowNull: false,
|
|
type: DataTypes.DATE
|
|
},
|
|
updatedAt: {
|
|
allowNull: false,
|
|
type: DataTypes.DATE
|
|
}
|
|
},
|
|
{
|
|
sequelize,
|
|
modelName: "Invite"
|
|
}
|
|
)
|
|
return Invite
|
|
}
|