Shows: update schema and dto
This commit is contained in:
parent
6cd5e3188f
commit
0d7ce28743
2 changed files with 5 additions and 3 deletions
|
|
@ -1,8 +1,9 @@
|
||||||
export class ShowDto {
|
export class ShowDto {
|
||||||
_id: string;
|
_id: string;
|
||||||
title: string;
|
title: string;
|
||||||
year: number;
|
date: Date;
|
||||||
seasons: number;
|
seasons: number;
|
||||||
|
episodes: number;
|
||||||
description: string;
|
description: string;
|
||||||
genres: string[];
|
genres: string[];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,9 @@ import { Schema } from 'mongoose';
|
||||||
|
|
||||||
export const ShowSchema = new Schema({
|
export const ShowSchema = new Schema({
|
||||||
title: { type: String, required: true },
|
title: { type: String, required: true },
|
||||||
year: { type: Number, required: true },
|
date: { type: Date, required: true },
|
||||||
seasons: { type: Number, required: true },
|
seasons: { type: Number, required: true},
|
||||||
|
episodes: { type: Number, required: true },
|
||||||
description: { type: String, required: true },
|
description: { type: String, required: true },
|
||||||
genres: [{ type: String, required: true }],
|
genres: [{ type: String, required: true }],
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue