diff options
author | eug-vs <eug-vs@keemail.me> | 2020-06-25 08:56:47 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-06-25 08:56:47 +0300 |
commit | ffcb9d248228087ee05c7569784705b41d729aee (patch) | |
tree | d753ff19df916a283991b3f9baf668df501cdfff /models/polls/poll.schema.ts | |
parent | 75e527334e4e9a94b63704f87aa650c75f13891c (diff) | |
download | which-api-ffcb9d248228087ee05c7569784705b41d729aee.tar.gz |
feat: create vote model
Diffstat (limited to 'models/polls/poll.schema.ts')
-rw-r--r-- | models/polls/poll.schema.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/models/polls/poll.schema.ts b/models/polls/poll.schema.ts index d495e4b..2f39aa1 100644 --- a/models/polls/poll.schema.ts +++ b/models/polls/poll.schema.ts @@ -17,7 +17,12 @@ export interface PollSchema extends Document { export const imageDataSchema = { url: String, - votes: [Types.ObjectId] + votes: [ + { + type: Types.ObjectId, + ref: 'vote' + } + ] }; export const pollSchema = new Schema({ |