diff options
author | Eugene Sokolov <eug-vs@keemail.me> | 2020-10-09 00:30:13 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-09 00:30:13 +0300 |
commit | afd2f44d3fd814953ff850ac3c5aec1acd9d8da1 (patch) | |
tree | dd667b1e0677c80c55cadf1e9ccdc6c8e01e1d64 /models | |
parent | 1229c5a4c76411617dc8eb8575f26bc35afb92b2 (diff) | |
parent | 8784f3ce54fd2361af4d3b2b71d43aa543884c93 (diff) | |
download | which-api-afd2f44d3fd814953ff850ac3c5aec1acd9d8da1.tar.gz |
Merge pull request #23 from which-ecosystem/feat/poll-description
Add description to Poll model
Diffstat (limited to 'models')
-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 }); |