initial commit
This commit is contained in:
22
models/GiveawayMsg.ts
Normal file
22
models/GiveawayMsg.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
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<GiveawayMsg>({
|
||||
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<GiveawayMsg>(
|
||||
'giveawayMsgModel', giveawayMsgSchema
|
||||
);
|
||||
Reference in New Issue
Block a user