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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 86 - (hide annotations)
Mon Jul 29 17:28:32 2024 UTC (8 months, 1 week ago) by rakin
File MIME type: application/typescript
File size: 784 byte(s)
Updated the database system
1 rakin 85 import { DataTypes, Model } from 'sequelize';
2     import DiscordClient from '../client/Client';
3    
4 rakin 86 class Note extends Model {}
5 rakin 85
6 rakin 86 Note.init({
7 rakin 85 id: {
8     type: DataTypes.INTEGER,
9 rakin 86 autoIncrement: true,
10 rakin 85 primaryKey: true,
11     },
12 rakin 86 content: {
13 rakin 85 type: DataTypes.STRING,
14 rakin 86 allowNull: false
15 rakin 85 },
16 rakin 86 author: {
17 rakin 85 type: DataTypes.STRING,
18     allowNull: false,
19     },
20 rakin 86 mod_tag: {
21 rakin 85 type: DataTypes.STRING,
22     allowNull: false,
23     },
24 rakin 86 user_id: {
25     type: DataTypes.STRING,
26     allowNull: false
27 rakin 85 },
28 rakin 86 guild_id: {
29 rakin 85 type: DataTypes.STRING,
30     allowNull: false
31     },
32     }, {
33     sequelize: DiscordClient.client.db.sequelize,
34 rakin 86 modelName: 'Note',
35 rakin 85 updatedAt: false,
36 rakin 86 tableName: 'notes'
37 rakin 85 });
38    
39 rakin 86 export default Note;

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26