1 |
rakin |
77 |
import { DataTypes, Model } from 'sequelize'; |
2 |
|
|
import DiscordClient from '../client/Client'; |
3 |
|
|
|
4 |
|
|
class BannedGuild extends Model {} |
5 |
|
|
|
6 |
|
|
BannedGuild.init({ |
7 |
|
|
id: { |
8 |
|
|
type: DataTypes.INTEGER, |
9 |
|
|
autoIncrement: true, |
10 |
|
|
primaryKey: true, |
11 |
|
|
}, |
12 |
|
|
reason: { |
13 |
|
|
type: DataTypes.TEXT, |
14 |
|
|
allowNull: true |
15 |
|
|
}, |
16 |
|
|
guild_id: { |
17 |
|
|
type: DataTypes.STRING, |
18 |
|
|
unique: true |
19 |
|
|
} |
20 |
|
|
}, { |
21 |
|
|
sequelize: DiscordClient.client.db.sequelize, |
22 |
|
|
modelName: 'BannedGuild', |
23 |
|
|
updatedAt: false, |
24 |
|
|
tableName: 'banned_guilds' |
25 |
|
|
}); |
26 |
|
|
|
27 |
|
|
export default BannedGuild; |