diff options
author | eug-vs <eug-vs@keemail.me> | 2020-09-14 20:07:39 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-09-14 20:07:39 +0300 |
commit | 8784f3ce54fd2361af4d3b2b71d43aa543884c93 (patch) | |
tree | 5089ec70db9b6bf0f0f6d24ce71a61b4845d2b0b | |
parent | cc57dfcafe68478fc84589e7f54a05ef464f46e3 (diff) | |
download | which-api-8784f3ce54fd2361af4d3b2b71d43aa543884c93.tar.gz |
feat: add description field to Poll model
-rw-r--r-- | models/polls/poll.schema.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/models/polls/poll.schema.ts b/models/polls/poll.schema.ts index 3a57c28..dc52c12 100644 --- a/models/polls/poll.schema.ts +++ b/models/polls/poll.schema.ts @@ -11,6 +11,7 @@ export interface PollSchema extends Document { }; createdAt: Date; authorId: string; + description: string; vote: (userId: string, which: 'left' | 'right') => PollSchema; } @@ -26,6 +27,7 @@ export const pollSchema = new Schema({ authorId: { type: Types.ObjectId, ref: 'User' - } + }, + description: String }, { timestamps: true }); |