File size: 1,010 Bytes
7676a27
 
 
 
 
5bd994f
 
 
 
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
import { Expose } from "class-transformer";
import { SwaggerResponseProperty } from "@lib/decorators/swagger-response-property.decorator";


export class IngredientSerialization {
  @Expose({ name: "_id" })
  @SwaggerResponseProperty({ type: "string" })
  id: string;
  
  @Expose()
  @SwaggerResponseProperty({ type: "string" })
  name: string;

  @Expose()
  @SwaggerResponseProperty({ type: "number" })
  serving_size: number;

  @Expose()
  @SwaggerResponseProperty({ type: "number" })
  servings_count: number;

  @Expose()
  @SwaggerResponseProperty({ type: "string" })
  serving_size_unit: string;

  @Expose()
  @SwaggerResponseProperty({ type: "string" })
  servings_count_unit: string;

  @Expose()
  @SwaggerResponseProperty({ type: "number" })
  calories: number;

  @Expose()
  @SwaggerResponseProperty({ type: "number" })
  carbs: number;

  @Expose()
  @SwaggerResponseProperty({ type: "number" })
  proteins: number;

  @Expose()
  @SwaggerResponseProperty({ type: "number" })
  fats: number;
}