/[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 334 by rakin, Mon Jul 29 17:29:36 2024 UTC
# Line 1  Line 1 
1  import { DataTypes, Model } from 'sequelize';  import { Schema, model } from 'mongoose';
 import DiscordClient from '../client/Client';  
2    
3  class Punishment extends Model {}  const schema = new Schema({
4        content: {
5  Punishment.init({          type: String,
6      id: {          required: true
7          type: DataTypes.INTEGER,      },
8          primaryKey: true,      author: {
9          autoIncrement: true,          type: String,
10          allowNull: false,          required: true,
11        },
12        mod_tag: {
13            type: String,
14            required: true,
15      },      },
16      user_id: {      user_id: {
17          type: DataTypes.STRING,          type: String,
18          allowNull: false,          required: true
     },  
     mod_id: {  
         type: DataTypes.STRING,  
         allowNull: false,  
19      },      },
20      guild_id: {      guild_id: {
21          type: DataTypes.STRING,          type: String,
22          allowNull: false,          required: true
     },  
     reason: {  
         type: DataTypes.TEXT,  
         allowNull: true  
     },  
     type: {  
         type: DataTypes.STRING,  
         allowNull: false  
     },  
     meta: {  
         type: DataTypes.JSON,  
         allowNull: false,  
         defaultValue: {}  
23      },      },
24  }, {      createdAt: {
25      sequelize: DiscordClient.client.db.sequelize,          type: Date,
26      modelName: 'Punishment',          required: true
27      updatedAt: false,      }
     tableName: 'punishments'  
28  });  });
29    
 export default Punishment;  
30    export default model("Note", schema);

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26