1 |
import { DataTypes, Model } from 'sequelize'; |
import { DataTypes, Model } from 'sequelize'; |
2 |
import DiscordClient from '../client/Client'; |
import DiscordClient from '../client/Client'; |
3 |
|
|
4 |
class Punishment extends Model {} |
class Note extends Model {} |
5 |
|
|
6 |
Punishment.init({ |
Note.init({ |
7 |
id: { |
id: { |
8 |
type: DataTypes.INTEGER, |
type: DataTypes.INTEGER, |
|
primaryKey: true, |
|
9 |
autoIncrement: true, |
autoIncrement: true, |
10 |
allowNull: false, |
primaryKey: true, |
11 |
}, |
}, |
12 |
user_id: { |
content: { |
13 |
type: DataTypes.STRING, |
type: DataTypes.STRING, |
14 |
allowNull: false, |
allowNull: false |
15 |
}, |
}, |
16 |
mod_id: { |
author: { |
17 |
type: DataTypes.STRING, |
type: DataTypes.STRING, |
18 |
allowNull: false, |
allowNull: false, |
19 |
}, |
}, |
20 |
guild_id: { |
mod_tag: { |
21 |
type: DataTypes.STRING, |
type: DataTypes.STRING, |
22 |
allowNull: false, |
allowNull: false, |
23 |
}, |
}, |
24 |
reason: { |
user_id: { |
|
type: DataTypes.TEXT, |
|
|
allowNull: true |
|
|
}, |
|
|
type: { |
|
25 |
type: DataTypes.STRING, |
type: DataTypes.STRING, |
26 |
allowNull: false |
allowNull: false |
27 |
}, |
}, |
28 |
meta: { |
guild_id: { |
29 |
type: DataTypes.JSON, |
type: DataTypes.STRING, |
30 |
allowNull: false, |
allowNull: false |
|
defaultValue: {} |
|
31 |
}, |
}, |
32 |
}, { |
}, { |
33 |
sequelize: DiscordClient.client.db.sequelize, |
sequelize: DiscordClient.client.db.sequelize, |
34 |
modelName: 'Punishment', |
modelName: 'Note', |
35 |
updatedAt: false, |
updatedAt: false, |
36 |
tableName: 'punishments' |
tableName: 'notes' |
37 |
}); |
}); |
38 |
|
|
|
export default Punishment; |
|
39 |
|
export default Note; |