Spaces:
Running
Running
File size: 784 Bytes
da50ce9 a99a515 da50ce9 a99a515 da50ce9 a99a515 da50ce9 a99a515 da50ce9 a99a515 da50ce9 a99a515 da50ce9 a99a515 da50ce9 a99a515 06bb8ce a99a515 da50ce9 |
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 |
import { SwaggerResponseProperty } from "@lib/decorators/swagger-response-property.decorator";
import { Expose, Transform } from "class-transformer";
export class AdminSerialization {
@Expose({ name: "_id" })
@SwaggerResponseProperty("string")
id: string;
@Expose()
@SwaggerResponseProperty("string")
name: string;
@Expose()
@SwaggerResponseProperty("string")
email: string;
@Expose()
@SwaggerResponseProperty({
type: {},
})
image: object;
@Expose()
@SwaggerResponseProperty("string")
role: string;
@Expose()
@SwaggerResponseProperty("string")
gender: string;
@Expose({ name: "dob" })
@SwaggerResponseProperty("number")
@Transform(
({ value }) => new Date().getFullYear() - new Date(value).getFullYear()
)
age: number;
}
|