Parent Directory
|
Revision Log
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 |