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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 242 - (hide annotations)
Mon Jul 29 17:29:10 2024 UTC (8 months, 1 week ago) by rakin
File MIME type: application/typescript
File size: 922 byte(s)
style: finishing touches to the channel locking system
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 rakin 242 allowNull: false
23 rakin 241 },
24     channel_id: {
25     type: DataTypes.STRING,
26 rakin 242 unique: true,
27     allowNull: false
28 rakin 241 },
29 rakin 242 role_id: {
30     type: DataTypes.STRING,
31     allowNull: false
32     },
33 rakin 241 previous_perms: {
34     type: DataTypes.JSON,
35     allowNull: false
36     }
37     }, {
38     sequelize: DiscordClient.client.db.sequelize,
39     modelName: 'ChannelLock',
40     updatedAt: false,
41     tableName: 'channel_lock'
42     });
43    
44     export default ChannelLock;

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26