diff options
| author | 8cy <[email protected]> | 2020-07-19 04:36:14 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-07-19 04:36:14 -0700 |
| commit | f00bcd79995bc8d7af3f297cab8085fd28b89435 (patch) | |
| tree | 9a4ddd1f0a945b1f20d98c20e621c0d8a69bb8ad /src/database/models/Reaction.ts | |
| download | water-waifu-re-f00bcd79995bc8d7af3f297cab8085fd28b89435.tar.xz water-waifu-re-f00bcd79995bc8d7af3f297cab8085fd28b89435.zip | |
:star:
Diffstat (limited to 'src/database/models/Reaction.ts')
| -rw-r--r-- | src/database/models/Reaction.ts | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/database/models/Reaction.ts b/src/database/models/Reaction.ts new file mode 100644 index 0000000..f72a799 --- /dev/null +++ b/src/database/models/Reaction.ts @@ -0,0 +1,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); |