/[sudobot]/trunk/src/models/Punishment.ts
ViewVC logotype

Annotation of /trunk/src/models/Punishment.ts

Parent Directory Parent Directory | Revision Log Revision Log


Revision 85 - (hide annotations)
Mon Jul 29 17:28:32 2024 UTC (8 months, 1 week ago) by rakin
Original Path: trunk/src/types/Punishment.ts
File MIME type: application/typescript
File size: 934 byte(s)
Updated warning system
1 rakin 85 import { DataTypes, Model } from 'sequelize';
2     import DiscordClient from '../client/Client';
3    
4     class Punishment extends Model {}
5    
6     Punishment.init({
7     id: {
8     type: DataTypes.INTEGER,
9     primaryKey: true,
10     autoIncrement: true,
11     allowNull: false,
12     },
13     user_id: {
14     type: DataTypes.STRING,
15     allowNull: false,
16     },
17     mod_id: {
18     type: DataTypes.STRING,
19     allowNull: false,
20     },
21     guild_id: {
22     type: DataTypes.STRING,
23     allowNull: false,
24     },
25     reason: {
26     type: DataTypes.TEXT,
27     allowNull: true
28     },
29     type: {
30     type: DataTypes.STRING,
31     allowNull: false
32     },
33     meta: {
34     type: DataTypes.JSON,
35     allowNull: false,
36     defaultValue: {}
37     },
38     }, {
39     sequelize: DiscordClient.client.db.sequelize,
40     modelName: 'Punishment',
41     updatedAt: false,
42     tableName: 'punishments'
43     });
44    
45     export default Punishment;

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26