summaryrefslogtreecommitdiff
path: root/server/src/database/models/ReactionModel.ts
blob: 509daddedc789a69711759787acce9b333c653be (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { Document, Schema, model } from 'mongoose';

export interface Reaction extends Document {
	guildID: string;
	messageID: string;
	channelID: string;
	userID: string;
	id: string;
	emoji: string;
	emojiType: string;
	roleID: string;
	uses: number;
	expiresAt?: Date;
	type: number;
	active: boolean;
}

const Reaction: Schema = new Schema({
    guildID: String,
    messageID: String,
    channelID: String,
    userID: String,
    id: String,
    emoji: String,
    emojiType: String,
    roleID: String,
    uses: Number,
    expiresAt: Date,
    type: Number,
    active: {
        type: Boolean,
        default: true,
    },
}, { strict: false });

export default model<Reaction>('Reaction', Reaction);