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

Diff of /trunk/src/models/Note.ts

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/src/types/Punishment.ts revision 85 by rakin, Mon Jul 29 17:28:32 2024 UTC trunk/src/models/Note.ts revision 86 by rakin, Mon Jul 29 17:28:32 2024 UTC
# Line 1  Line 1 
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;

Legend:
Removed from v.85  
changed lines
  Added in v.86

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26