summaryrefslogtreecommitdiff
path: root/src/database/models/Reaction.ts
blob: f72a7990a6a9238147d2ffcc46a44fb261aa6bbf (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
37
38
39
40
41
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);