From 0d7ce2874349c3230a04b2126277cac8c9875e05 Mon Sep 17 00:00:00 2001 From: Toast Date: Thu, 30 Jan 2025 11:02:18 +0100 Subject: [PATCH] Shows: update schema and dto --- src/shows/dto/show.dto.ts | 3 ++- src/shows/schema/show.schema.ts | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/shows/dto/show.dto.ts b/src/shows/dto/show.dto.ts index 930c1a1..36bdb8f 100644 --- a/src/shows/dto/show.dto.ts +++ b/src/shows/dto/show.dto.ts @@ -1,8 +1,9 @@ export class ShowDto { _id: string; title: string; - year: number; + date: Date; seasons: number; + episodes: number; description: string; genres: string[]; } diff --git a/src/shows/schema/show.schema.ts b/src/shows/schema/show.schema.ts index 3f98dc4..28daa01 100644 --- a/src/shows/schema/show.schema.ts +++ b/src/shows/schema/show.schema.ts @@ -2,8 +2,9 @@ import { Schema } from 'mongoose'; export const ShowSchema = new Schema({ title: { type: String, required: true }, - year: { type: Number, required: true }, - seasons: { type: Number, required: true }, + date: { type: Date, required: true }, + seasons: { type: Number, required: true}, + episodes: { type: Number, required: true }, description: { type: String, required: true }, genres: [{ type: String, required: true }], });