aboutsummaryrefslogtreecommitdiff
path: root/models
diff options
context:
space:
mode:
authorEugene Sokolov <eug-vs@keemail.me>2020-10-09 00:30:13 +0300
committerGitHub <noreply@github.com>2020-10-09 00:30:13 +0300
commitafd2f44d3fd814953ff850ac3c5aec1acd9d8da1 (patch)
treedd667b1e0677c80c55cadf1e9ccdc6c8e01e1d64 /models
parent1229c5a4c76411617dc8eb8575f26bc35afb92b2 (diff)
parent8784f3ce54fd2361af4d3b2b71d43aa543884c93 (diff)
downloadwhich-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.ts4
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 });