Spaces:
Running
Running
Hozifa Elgharbawy
Update SwaggerResponseProperty types in serializers, add summary and description
339fa48
import { Expose, Transform } from "class-transformer"; | |
import { serialize } from "@helpers/serialize"; | |
import { SwaggerResponseProperty } from "@lib/decorators/swagger-response-property.decorator"; | |
import { ExerciseSerialization } from "./exercise.serialization"; | |
class WorkoutDaysPopulate { | |
() | |
type: "number" }) | ({|
day_number: number; | |
() | |
type: "number" }) | ({|
total_number_exercises: number; | |
() | |
type: "string" }) | ({|
day_type: string; | |
name: "exercises" }) | ({|
type: [ExerciseSerialization] }) | ({|
exercises: any; | |
} | |
class WorkoutTemplateWeeksPopulate { | |
() | |
type: "number" }) | ({|
week_number: number; | |
() | |
type: "string" }) | ({|
week_name: string; | |
() | |
type: "string" }) | ({|
week_description: string; | |
name: "days" }) | ({|
type: [WorkoutDaysPopulate] }) | ({|
( | |
({ value }) => serialize(value, WorkoutDaysPopulate) | |
) | |
days: any; | |
} | |
export class WorkoutSerializationPopulate { | |
name: "_id" }) | ({|
type: "string" }) | ({|
id: string; | |
() | |
type: "string" }) | ({|
name: string; | |
() | |
type: "string" }) | ({|
description: string; | |
() | |
type: "string" }) | ({|
type: string; | |
() | |
type: "string" }) | ({|
image: string; | |
() | |
type: "string" }) | ({|
created_by: string; | |
() | |
type: "string" }) | ({|
fitness_level: string; | |
() | |
type: "string" }) | ({|
fitness_goal: string; | |
() | |
type: "string" }) | ({|
place: any; | |
() | |
type: "number" }) | ({|
min_per_day: number; | |
() | |
type: "number" }) | ({|
total_number_days: number; | |
name: "template_weeks" }) | ({|
type: [WorkoutTemplateWeeksPopulate] }) | ({|
( | |
({ value }) => serialize(value, WorkoutTemplateWeeksPopulate) | |
) | |
template_weeks: any; | |
} |