DiscordJS-Example/models/roleEmojiPairs.js

26 lines
498 B
JavaScript
Raw Normal View History

2024-01-29 13:59:36 +00:00
import { DataTypes, Deferrable } from "sequelize";
2024-01-28 23:32:13 +00:00
export default function(sequelize) {
2024-01-29 13:59:36 +00:00
return sequelize.define('RoleEmojiPairs', {
2024-01-28 23:32:13 +00:00
id: {
defaultValue: DataTypes.UUIDV4,
type: DataTypes.UUID,
primaryKey: true,
},
2024-01-29 13:59:36 +00:00
message: {
type: DataTypes.STRING,
references: {
deferrable: Deferrable.INITIALLY_IMMEDIATE,
model: 'Messages',
key: 'id',
},
},
2024-01-28 23:32:13 +00:00
role: {
type: DataTypes.STRING,
},
emoji: {
type: DataTypes.STRING,
}
});
}