Parent Directory
|
Revision Log
refactor(db): use mongodb in spamfilter
1 | import { DataTypes, Model } from 'sequelize'; |
2 | import DiscordClient from '../client/Client'; |
3 | import { Schema, model } from 'mongoose'; |
4 | |
5 | export interface ISpamViolation { |
6 | user_id: string; |
7 | guild_id: string; |
8 | strike?: number; |
9 | createdAt: Date; |
10 | } |
11 | |
12 | const schema = new Schema({ |
13 | user_id: { |
14 | type: String, |
15 | required: true |
16 | }, |
17 | guild_id: { |
18 | type: String, |
19 | required: true |
20 | }, |
21 | strike: { |
22 | type: Number, |
23 | required: true, |
24 | default: 1 |
25 | }, |
26 | createdAt: { |
27 | type: Date, |
28 | required: true |
29 | } |
30 | }); |
31 | |
32 | export default model('SpamViolation', schema); |
[email protected] | ViewVC Help |
Powered by ViewVC 1.1.26 |