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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26