Fakultas Ilmu Komputer UI

models.ts 1.52 KB
Newer Older
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
import { User } from 'services/auth/models';

export interface UserReportRequest {
  weight: number;
  height: number;
  waist_size: number;
  changes_felt: number;
  hunger_level: number;
  fullness_level: number;
  heavy_meal: number;
  snacks: number;
  sweet_beverages: number;
  sugary_ingredients: number;
  fried_snacks: number;
  umami_snacks: number;
  sweet_snacks: number;
  fruits_portion: number;
  vegetables_portion: number;
  water_consumption: number;
  physical_activity: number[];
  physical_activity_other: string;
  time_for_activity: number;
  feeling_rating: number;
  lesson_learned: string;
  problem_faced_and_feedbacks: string;
}

export interface UserReportResponse extends UserReportRequest {
  client: User;
  nutritionist: number;
  id: number;
  week_num: number;
}
34

35
36
37
38
39
40
export interface UserReportsResponse {
  has_submitted_this_week: boolean;
  today_week: number;
  data: UserReportResponse[];
}

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
66
export interface NutritionistComment {
  weight: string;
  height: string;
  waist_size: string;
  changes_felt: string;
  hunger_level: string;
  fullness_level: string;
  heavy_meal: string;
  snacks: string;
  average_consumption: string;
  water_consumption: string;
  physical_activity: string;
  time_for_activity: string;
  feeling_rating: string;
  lesson_learned: string;
  problem_faced_and_feedbacks: string;
}

export interface NutritionistCommentRequest extends NutritionistComment {
  weekly_report: number;
}

export interface NutritionistCommentResponse
  extends NutritionistCommentRequest {
  id: number;
}