From 0abee6dca4822237626d6dd2767a33c9b9aa295e Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 22 May 2021 12:01:07 +0200 Subject: :bug: fix Channel + Invite Model --- src/models/Invite.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/models/Invite.ts') diff --git a/src/models/Invite.ts b/src/models/Invite.ts index 41f33a02..d6e8536e 100644 --- a/src/models/Invite.ts +++ b/src/models/Invite.ts @@ -4,22 +4,25 @@ import { ChannelModel } from "./Channel"; import { UserModel } from "./User"; import { GuildModel } from "./Guild"; -export interface Invite extends Document { +export interface Invite { code: string; temporary: boolean; uses: number; max_uses: number; max_age: number; created_at: Date; + expires_at: Date; guild_id: string; channel_id: string; inviter_id: string; - // ? What the fucking shit is this + // ? What is this? target_user_id?: string; target_user_type?: number; } +export interface InviteDocument extends Invite, Document {} + export const InviteSchema = new Schema({ code: String, temporary: Boolean, @@ -27,11 +30,12 @@ export const InviteSchema = new Schema({ max_uses: Number, max_age: Number, created_at: Date, + expires_at: Date, guild_id: String, channel_id: String, inviter_id: String, - // ? What the fucking shit is this + // ? What is this? target_user_id: String, target_user_type: Number, }); @@ -94,4 +98,4 @@ InviteSchema.virtual("guild", { }); // @ts-ignore -export const InviteModel = db.model("Invite", InviteSchema, "invites"); +export const InviteModel = db.model("Invite", InviteSchema, "invites"); -- cgit 1.5.1