1 |
import { BuildOptions, DataTypes, Model, Optional } from 'sequelize'; |
import { Schema, model } from 'mongoose'; |
|
import DiscordClient from '../client/Client'; |
|
2 |
|
|
3 |
class PunishmentAppeal extends Model { |
const schema = new Schema({ |
|
|
|
|
} |
|
|
|
|
|
PunishmentAppeal.init({ |
|
|
id: { |
|
|
type: DataTypes.INTEGER, |
|
|
primaryKey: true, |
|
|
autoIncrement: true, |
|
|
allowNull: false, |
|
|
}, |
|
4 |
user_id: { |
user_id: { |
5 |
type: DataTypes.STRING, |
type: String, |
6 |
allowNull: false, |
required: true, |
7 |
}, |
}, |
8 |
guild_id: { |
guild_id: { |
9 |
type: DataTypes.STRING, |
type: String, |
10 |
allowNull: false, |
required: true, |
11 |
}, |
}, |
12 |
content: { |
content: { |
13 |
type: DataTypes.TEXT, |
type: String, |
14 |
allowNull: false |
required: true |
15 |
|
}, |
16 |
|
createdAt: { |
17 |
|
type: Date, |
18 |
|
required: true |
19 |
} |
} |
|
}, { |
|
|
sequelize: DiscordClient.client.db.sequelize, |
|
|
modelName: 'PunishmentAppeal', |
|
|
updatedAt: false, |
|
|
tableName: 'appeals' |
|
20 |
}); |
}); |
21 |
|
|
|
export default PunishmentAppeal; |
|
22 |
|
export default model('PunishmentAppeal', schema); |