Spaces:
Running
Running
import { Expose, Transform } from "class-transformer"; | |
import { serialize } from "@helpers/serialize"; | |
class ExpectedDurationRange { | |
() | |
min: number; | |
() | |
max: number; | |
} | |
class Media { | |
() | |
type: string; | |
() | |
url: string; | |
} | |
export class ExerciseSerialization { | |
name: "_id" }) | ({|
id: string; | |
() | |
name: string; | |
() | |
category: string; | |
() | |
duration: number | null; | |
name: "expectedDurationRange" }) | ({|
( | |
({ value }) => serialize(value, ExpectedDurationRange) | |
) | |
expectedDurationRange: object; | |
() | |
reps: number; | |
() | |
sets: number; | |
() | |
instructions: string; | |
() | |
benefits: string; | |
() | |
targetMuscles: any; | |
() | |
equipments: any; | |
name: "media" }) | ({|
( | |
({ value }) => serialize(value, Media) | |
) | |
media: object; | |
} | |