@@ -196,31 +196,31 @@ export class Distributor {
196
196
}
197
197
198
198
export class Premiere {
199
- @ApiPropertyOptional ( )
199
+ @ApiPropertyOptional ( { example : 'США' } )
200
200
@Prop ( )
201
201
country : string ;
202
202
203
- @ApiPropertyOptional ( )
203
+ @ApiPropertyOptional ( { example : '01.02.2023' , type : Date } )
204
204
@Prop ( { type : ( ) => Date , index : true } )
205
205
world : string ;
206
206
207
- @ApiPropertyOptional ( )
207
+ @ApiPropertyOptional ( { example : '01.02.2023' , type : Date } )
208
208
@Prop ( { type : ( ) => Date , index : true } )
209
209
russia : string ;
210
210
211
211
@ApiPropertyOptional ( )
212
212
@Prop ( { type : ( ) => Date , index : true } )
213
213
digital : string ;
214
214
215
- @ApiPropertyOptional ( )
215
+ @ApiPropertyOptional ( { example : '01.02.2023' , type : Date } )
216
216
@Prop ( { type : ( ) => Date } )
217
217
cinema : string ;
218
218
219
- @ApiPropertyOptional ( )
219
+ @ApiPropertyOptional ( { example : '01.02.2023' , type : Date } )
220
220
@Prop ( { type : ( ) => Date } )
221
221
bluray : string ;
222
222
223
- @ApiPropertyOptional ( )
223
+ @ApiPropertyOptional ( { example : '01.02.2023' , type : Date } )
224
224
@Prop ( { type : ( ) => Date } )
225
225
dvd : string ;
226
226
}
@@ -360,16 +360,7 @@ export class YearRange {
360
360
export type MovieDocument = HydratedDocument < Movie > ;
361
361
@Schema ( {
362
362
timestamps : true ,
363
- toJSON : {
364
- virtuals : true ,
365
- transform : ( doc , ret ) => {
366
- if ( ret ?. __v ) delete ret . __v ;
367
- if ( ret ?. _id ) delete ret . _id ;
368
- if ( ret ?. externalId ?. _id ) delete ret . externalId . _id ;
369
- if ( ret ?. videos ?. _id ) delete ret . videos . _id ;
370
- if ( ret ?. videos ?. trailers ) ret ?. videos ?. trailers . forEach ( ( i ) => delete i . _id ) ;
371
- } ,
372
- } ,
363
+ toJSON : { virtuals : true } ,
373
364
toObject : { virtuals : true } ,
374
365
} )
375
366
export class Movie {
0 commit comments