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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 327 - (hide annotations)
Mon Jul 29 17:29:33 2024 UTC (8 months, 1 week ago) by rakin
File MIME type: application/typescript
File size: 668 byte(s)
refactor(db): switch to mongodb
1 rakin 304 import { DataTypes, Model } from 'sequelize';
2     import DiscordClient from '../client/Client';
3 rakin 327 import { Schema, model, SchemaTypes, Document } from 'mongoose';
4 rakin 304
5 rakin 327 export interface IAFK extends Document {
6     user: string;
7     reason?: string;
8     mentions: Array<object>;
9     guild_id: string;
10     createdAt: Date;
11     }
12 rakin 304
13 rakin 327 const schema = new Schema({
14 rakin 304 user: {
15 rakin 327 type: String,
16     required: true
17 rakin 304 },
18     reason: {
19 rakin 327 type: String,
20     required: false
21 rakin 304 },
22 rakin 327 mentions: Array,
23 rakin 304 guild_id: {
24 rakin 327 type: String,
25     required: true
26 rakin 304 },
27 rakin 327 createdAt: {
28     type: Date,
29     required: true
30     }
31 rakin 304 });
32    
33 rakin 327 export default model('AFK', schema);

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26