Spaces:
Sleeping
Sleeping
File size: 1,487 Bytes
7676a27 ce1ade1 7676a27 339fa48 ce1ade1 7676a27 ce1ade1 7676a27 bb3dc70 7676a27 339fa48 7676a27 ce1ade1 7676a27 b06655a 7676a27 b06655a 7676a27 b06655a 7676a27 b06655a ce1ade1 7676a27 ce1ade1 7676a27 b06655a 7676a27 ce1ade1 7676a27 ce1ade1 7676a27 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
import { Expose, Transform } from "class-transformer";
import { serialize } from "@helpers/serialize";
import { SwaggerResponseProperty } from "@lib/decorators/swagger-response-property.decorator";
class MealPlanDays {
@Expose()
@SwaggerResponseProperty({ type: "string" })
title: string;
@Expose({ name: "meals" })
@SwaggerResponseProperty({ type: ["string"] })
meals: any;
}
class MealPlanKeyFeatures {
@Expose()
@SwaggerResponseProperty({ type: "string" })
title: string;
@Expose({ name: "description" })
@SwaggerResponseProperty({ type: "string" })
description: any;
}
export class MealPlanSerialization {
@Expose({ name: "_id" })
@SwaggerResponseProperty({ type: "string" })
id: string;
@Expose()
@SwaggerResponseProperty({ type: "string" })
image: string;
@Expose()
@SwaggerResponseProperty({ type: "string" })
description: string;
@Expose()
@SwaggerResponseProperty({ type: "string" })
duration: string;
@Expose()
@SwaggerResponseProperty({ type: "string" })
level: string;
@Expose()
@SwaggerResponseProperty({ type: "string" })
your_journey: string;
@Expose({ name: "key_features" })
@SwaggerResponseProperty({ type: [MealPlanKeyFeatures] })
@Transform(
({ value }) => serialize(value, MealPlanKeyFeatures)
)
key_features: any;
@Expose({ name: "days" })
@SwaggerResponseProperty({ type: [MealPlanDays] })
@Transform(
({ value }) => serialize(value, MealPlanDays)
)
days: any;
} |