aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 });