diff options
Diffstat (limited to 'models/polls/poll.schema.ts')
-rw-r--r-- | models/polls/poll.schema.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/models/polls/poll.schema.ts b/models/polls/poll.schema.ts index 2e7dccd..79036c3 100644 --- a/models/polls/poll.schema.ts +++ b/models/polls/poll.schema.ts @@ -1,12 +1,11 @@ import { Document, Schema, Types } from 'mongoose'; -import { User } from '../users/user.schema'; interface ImageData { url: string; votes: number; } -export interface Poll extends Document { +export interface PollSchema extends Document { authorId: string; contents: { left: ImageData; @@ -20,7 +19,7 @@ const imageDataSchema = { votes: Number } -export const PollSchema = new Schema({ +export const pollSchema = new Schema({ contents: { left: imageDataSchema, right: imageDataSchema |