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

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

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

revision 86 by rakin, Mon Jul 29 17:28:32 2024 UTC revision 334 by rakin, Mon Jul 29 17:29:36 2024 UTC
# Line 1  Line 1 
1  import { DataTypes, Model } from 'sequelize';  import { Schema, model } from 'mongoose';
 import DiscordClient from '../client/Client';  
2    
3  class Note extends Model {}  const schema = new Schema({
   
 Note.init({  
     id: {  
         type: DataTypes.INTEGER,  
         autoIncrement: true,  
         primaryKey: true,  
     },  
4      content: {      content: {
5          type: DataTypes.STRING,          type: String,
6          allowNull: false          required: true
7      },      },
8      author: {      author: {
9          type: DataTypes.STRING,          type: String,
10          allowNull: false,          required: true,
11      },      },
12      mod_tag: {      mod_tag: {
13          type: DataTypes.STRING,          type: String,
14          allowNull: false,          required: true,
15      },      },
16      user_id: {      user_id: {
17          type: DataTypes.STRING,          type: String,
18          allowNull: false          required: true
19      },      },
20      guild_id: {      guild_id: {
21          type: DataTypes.STRING,          type: String,
22          allowNull: false          required: true
23      },      },
24  }, {      createdAt: {
25      sequelize: DiscordClient.client.db.sequelize,          type: Date,
26      modelName: 'Note',          required: true
27      updatedAt: false,      }
     tableName: 'notes'  
28  });  });
29    
 export default Note;  
30    export default model("Note", schema);

Legend:
Removed from v.86  
changed lines
  Added in v.334

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26