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

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

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

revision 124 by rakin, Mon Jul 29 17:28:41 2024 UTC revision 333 by rakin, Mon Jul 29 17:29:35 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    import { Schema, model } from 'mongoose';
4    
5  class Hardmute extends Model {}  const schema = new Schema({
   
 Hardmute.init({  
     id: {  
         type: DataTypes.INTEGER,  
         autoIncrement: true,  
         primaryKey: true,  
     },  
6      user_id: {      user_id: {
7          type: DataTypes.STRING,          type: String,
8          allowNull: false          required: true
9      },      },
10      roles: {      roles: {
11          type: DataTypes.JSON,          type: Array,
12          allowNull: false          required: true
13      },      },
14      guild_id: {      guild_id: {
15          type: DataTypes.STRING,          type: String,
16          allowNull: false          required: true
17        },
18        createdAt: {
19            type: Date,
20            required: true
21      }      }
 }, {  
     sequelize: DiscordClient.client.db.sequelize,  
     modelName: 'Hardmute',  
     updatedAt: false  
22  });  });
23    
 export default Hardmute;  
24    export default model('Hardmute', schema);

Legend:
Removed from v.124  
changed lines
  Added in v.333

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26