diff options
Diffstat (limited to 'models/polls/poll.schema.ts')
-rw-r--r-- | models/polls/poll.schema.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/models/polls/poll.schema.ts b/models/polls/poll.schema.ts index 380c069..d495e4b 100644 --- a/models/polls/poll.schema.ts +++ b/models/polls/poll.schema.ts @@ -10,6 +10,7 @@ export interface PollSchema extends Document { left: ImageDataSchema; right: ImageDataSchema; }; + createdAt: Date; authorId: string; vote: (userId: string, which: 'left' | 'right') => PollSchema; } @@ -28,5 +29,5 @@ export const pollSchema = new Schema({ type: Types.ObjectId, ref: 'User' } -}); +}, { timestamps: true }); |