Spaces:
Running
Running
Hozifa Elgharbawy
refactor: Update ExercisePopulateSerialization import in user-registered-workoutPopulate.serialization.ts
a91980c
| import { Expose, Transform } from "class-transformer"; | |
| import { serialize } from "@helpers/serialize"; | |
| import { SwaggerResponseProperty } from "@lib/decorators/swagger-response-property.decorator"; | |
| import { ExercisePopulateSerialization } from "./exercisePopulate.serialization"; | |
| class MyWorkoutDaysPopulate { | |
| () | |
| ({ type: "number" }) | |
| day_number: number; | |
| () | |
| ({ type: "number" }) | |
| total_number_exercises: number; | |
| () | |
| ({ type: "string" }) | |
| day_type: string; | |
| ({ name: "exercises" }) | |
| ({ type: [ExercisePopulateSerialization] }) | |
| exercises: any; | |
| () | |
| ({ type: "boolean" }) | |
| is_done: Boolean; | |
| } | |
| class MyWorkoutWeeksPopulate { | |
| () | |
| ({ type: "number" }) | |
| week_number: number; | |
| () | |
| ({ type: "string" }) | |
| week_name: string; | |
| () | |
| ({ type: "string" }) | |
| week_description: string; | |
| ({ name: "days" }) | |
| ({ type: [MyWorkoutDaysPopulate] }) | |
| (({ value }) => serialize(value, MyWorkoutDaysPopulate)) | |
| days: any; | |
| () | |
| ({ type: "boolean" }) | |
| is_done: Boolean; | |
| } | |
| class Workout { | |
| ({ 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; | |
| } | |
| export class UserRegisteredWorkoutsPopulateSerialization { | |
| ({ name: "_id" }) | |
| ({ type: "string" }) | |
| id: string; | |
| () | |
| ({ type: "string" }) | |
| user: string; | |
| () | |
| ({ type: Workout }) | |
| (({ value }) => serialize(value, Workout)) | |
| workout: string; | |
| () | |
| ({ type: "boolean" }) | |
| is_active: Boolean; | |
| ({ name: "weeks" }) | |
| ({ type: [MyWorkoutWeeksPopulate] }) | |
| (({ value }) => serialize(value, MyWorkoutWeeksPopulate)) | |
| weeks: any; | |
| } |