import {Schema, Types, model} from 'mongoose'; import {Guild} from './Guild'; export interface GiveawayMsg{ _id: Types.ObjectId; guild: Guild; messageId: string; authorId: string; userIds: string[]; } const giveawayMsgSchema = new Schema({ guild: {type: Schema.Types.ObjectId, required: true}, messageId: {type: String, required: true}, authorId: {type: String, required: true}, userIds: {type: [{type: String}], default: []} }); export const giveawayMsgModel = model( 'giveawayMsgModel', giveawayMsgSchema );