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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 241 - (hide annotations)
Mon Jul 29 17:29:10 2024 UTC (8 months, 1 week ago) by rakin
File MIME type: application/typescript
File size: 792 byte(s)
feat: improved channel locking system (#18)
1 rakin 241 import { DataTypes, Model } from 'sequelize';
2     import DiscordClient from '../client/Client';
3    
4     class ChannelLock extends Model {}
5    
6     ChannelLock.init({
7     id: {
8     type: DataTypes.INTEGER,
9     autoIncrement: true,
10     primaryKey: true,
11     },
12     reason: {
13     type: DataTypes.TEXT,
14     allowNull: true
15     },
16     user_id: {
17     type: DataTypes.STRING,
18     allowNull: false
19     },
20     guild_id: {
21     type: DataTypes.STRING,
22     },
23     channel_id: {
24     type: DataTypes.STRING,
25     unique: true
26     },
27     previous_perms: {
28     type: DataTypes.JSON,
29     allowNull: false
30     }
31     }, {
32     sequelize: DiscordClient.client.db.sequelize,
33     modelName: 'ChannelLock',
34     updatedAt: false,
35     tableName: 'channel_lock'
36     });
37    
38     export default ChannelLock;

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26