Spaces:
Running
Running
| import { Expose, Transform } from "class-transformer"; | |
| import { serialize } from "@helpers/serialize"; | |
| import { EquipmentSerialization } from "./muscle.serialization"; | |
| import { MuscleSerialization } from "./equipment.serialization"; | |
| import { SwaggerResponseProperty } from "@lib/decorators/swagger-response-property.decorator"; | |
| class ExpectedDurationRangePopulate { | |
| () | |
| ({ type: "number" }) | |
| min: number; | |
| () | |
| ({ type: "number" }) | |
| max: number; | |
| } | |
| class MediaPopulate { | |
| () | |
| ({ type: "string" }) | |
| type: string; | |
| () | |
| ({ type: "string" }) | |
| url: string; | |
| } | |
| class TargetMusclesPopulate { | |
| () | |
| ({ type: MuscleSerialization }) | |
| primary: string; | |
| () | |
| ({ type: MuscleSerialization }) | |
| secondary: string; | |
| } | |
| export class ExercisePopulateSerialization { | |
| ({ name: "_id" }) | |
| ({ type: "string" }) | |
| id: string; | |
| () | |
| ({ type: "string" }) | |
| name: string; | |
| () | |
| ({ type: "string" }) | |
| category: string; | |
| () | |
| ({ type: "string" }) | |
| exerciseType: string; | |
| () | |
| ({ type: "number" }) | |
| duration: number | null; | |
| ({ name: "expectedDurationRange" }) | |
| ({ type: ExpectedDurationRangePopulate }) | |
| (({ value }) => serialize(value, ExpectedDurationRangePopulate)) | |
| expectedDurationRange: object; | |
| () | |
| ({ type: "number" }) | |
| reps: number; | |
| () | |
| ({ type: "number" }) | |
| sets: number; | |
| () | |
| ({ type: "string" }) | |
| instructions: string; | |
| () | |
| ({ type: "string" }) | |
| benefits: string; | |
| () | |
| ({ type: TargetMusclesPopulate }) | |
| targetMuscles: any; | |
| () | |
| ({ type: [EquipmentSerialization] }) | |
| equipments: any; | |
| () | |
| ('string') | |
| coverImage: string; | |
| ({ name: "media" }) | |
| ({ type: MediaPopulate }) | |
| (({ value }) => serialize(value, MediaPopulate)) | |
| media: object; | |
| } | |