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

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

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

revision 331 by rakin, Mon Jul 29 17:29:35 2024 UTC revision 332 by rakin, Mon Jul 29 17:29:35 2024 UTC
# Line 2  import { DataTypes, Model } from 'sequel Line 2  import { DataTypes, Model } from 'sequel
2  import DiscordClient from '../client/Client';  import DiscordClient from '../client/Client';
3  import { Schema, model, Document, SchemaTypes } from 'mongoose';  import { Schema, model, Document, SchemaTypes } from 'mongoose';
4    
 // export interface IChannelLock extends Document {  
 //     user: string;  
 //     reason?: string;  
 //     mentions: Array<object>;  
 //     guild_id: string;  
 //     createdAt: Date;  
 // }  
   
5  const schema = new Schema({  const schema = new Schema({
6      reason: {      reason: {
7          type: String,          type: String,
# Line 42  const schema = new Schema({ Line 34  const schema = new Schema({
34      }      }
35  });  });
36    
 // class ChannelLock extends Model {}  
   
 // ChannelLock.init({  
 //     id: {  
 //         type: DataTypes.INTEGER,  
 //         autoIncrement: true,  
 //         primaryKey: true,  
 //     },  
 //     reason: {  
 //         type: DataTypes.TEXT,  
 //         allowNull: true  
 //     },  
 //     user_id: {  
 //         type: DataTypes.STRING,  
 //         allowNull: false  
 //     },  
 //     guild_id: {  
 //         type: DataTypes.STRING,  
 //         allowNull: false  
 //     },  
 //     channel_id: {  
 //         type: DataTypes.STRING,  
 //         unique: true,  
 //         allowNull: false  
 //     },  
 //     role_id: {  
 //         type: DataTypes.STRING,  
 //         allowNull: false  
 //     },  
 //     previous_perms: {  
 //         type: DataTypes.JSON,  
 //         allowNull: false  
 //     }  
 // }, {  
 //     sequelize: DiscordClient.client.db.sequelize,  
 //     modelName: 'ChannelLock',  
 //     updatedAt: false,  
 //     tableName: 'channel_lock'  
 // });  
   
37  export default model('ChannelLock', schema);  export default model('ChannelLock', schema);

Legend:
Removed from v.331  
changed lines
  Added in v.332

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26