1/* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16import { FoodInfo, CategoryId, MealTimeId, DietRecord } from '../model/DataModels' 17 18export let mockFoods: Array<FoodInfo> = [ 19 { 20 id: 0, 21 letter: 'Tomato', 22 name: $r('app.string.food_name_tomato'), 23 image: $r('app.media.tomato'), 24 categoryId: CategoryId.Vegetable, 25 calories: 15, 26 protein: 0.9, 27 fat: 0.2, 28 carbohydrates: 3.3, 29 vitaminC: 14.0 30 }, 31 { 32 id: 1, 33 letter: 'Walnut', 34 name: $r('app.string.food_name_walnut'), 35 image: $r('app.media.walnut'), 36 categoryId: CategoryId.Nut, 37 calories: 646, 38 protein: 14.9, 39 fat: 58.8, 40 carbohydrates: 19.1, 41 vitaminC: 1.0 42 }, 43 { 44 id: 2, 45 letter: 'Cucumber', 46 name: $r('app.string.food_name_cucumber'), 47 image: $r('app.media.cucumber'), 48 categoryId: CategoryId.Vegetable, 49 calories: 16, 50 protein: 0.8, 51 fat: 0.2, 52 carbohydrates: 2.9, 53 vitaminC: 9.0 54 }, 55 { 56 id: 3, 57 letter: 'Blueberry', 58 name: $r('app.string.food_name_blueberry'), 59 image: $r('app.media.blueberry'), 60 categoryId: CategoryId.Fruit, 61 calories: 57, 62 protein: 0.7, 63 fat: 0.3, 64 carbohydrates: 14.5, 65 vitaminC: 9.7 66 }, 67 { 68 id: 4, 69 letter: 'Crab', 70 name: $r('app.string.food_name_crab'), 71 image: $r('app.media.crab'), 72 categoryId: CategoryId.Seafood, 73 calories: 97, 74 protein: 19, 75 fat: 1.5, 76 carbohydrates: 0, 77 vitaminC: 7.6 78 }, 79 { 80 id: 5, 81 letter: 'IceCream', 82 name: $r('app.string.food_name_ice_cream'), 83 image: $r('app.media.icecream'), 84 categoryId: CategoryId.Dessert, 85 calories: 150, 86 protein: 3.5, 87 fat: 11, 88 carbohydrates: 24, 89 vitaminC: 0.6 90 }, 91 { 92 id: 6, 93 letter: 'Onion', 94 name: $r('app.string.food_name_onion'), 95 image: $r('app.media.onion'), 96 categoryId: CategoryId.Vegetable, 97 calories: 40, 98 protein: 1.1, 99 fat: 0.2, 100 carbohydrates: 9, 101 vitaminC: 8.0 102 }, 103 { 104 id: 7, 105 letter: 'Mushroom', 106 name: $r('app.string.food_name_mushroom'), 107 image: $r('app.media.mushroom'), 108 categoryId: CategoryId.Vegetable, 109 calories: 20, 110 protein: 3.1, 111 fat: 0.3, 112 carbohydrates: 3.3, 113 vitaminC: 206 114 }, 115 { 116 id: 8, 117 letter: 'Kiwi', 118 name: $r('app.string.food_name_kiwi'), 119 image: $r('app.media.kiwi'), 120 categoryId: CategoryId.Fruit, 121 calories: 61, 122 protein: 0.8, 123 fat: 0.6, 124 carbohydrates: 14.5, 125 vitaminC: 62 126 }, 127 { 128 id: 9, 129 letter: 'Pitaya', 130 name: $r('app.string.food_name_pitaya'), 131 image: $r('app.media.pitaya'), 132 categoryId: CategoryId.Fruit, 133 calories: 55, 134 protein: 1.1, 135 fat: 0.2, 136 carbohydrates: 13.3, 137 vitaminC: 3.0 138 }, 139 { 140 id: 10, 141 letter: 'Avocado', 142 name: $r('app.string.food_name_avocado'), 143 image: $r('app.media.avocado'), 144 categoryId: CategoryId.Fruit, 145 calories: 171, 146 protein: 2.0, 147 fat: 15.3, 148 carbohydrates: 7.4, 149 vitaminC: 8.0 150 }, 151 { 152 id: 11, 153 letter: 'Strawberry', 154 name: $r('app.string.food_name_strawberry'), 155 image: $r('app.media.strawberry'), 156 categoryId: CategoryId.Fruit, 157 calories: 32, 158 protein: 1.0, 159 fat: 0.2, 160 carbohydrates: 7.1, 161 vitaminC: 47.0 162 } 163] 164 165export let mockFoodInfo: FoodInfo = { 166 id: 0, 167 letter: 'Tomato', 168 name: $r('app.string.food_name_tomato'), 169 image: $r('app.media.tomato'), 170 categoryId: CategoryId.Vegetable, 171 calories: 15, 172 protein: 0.9, 173 fat: 0.2, 174 carbohydrates: 3.3, 175 vitaminC: 14.0 176} 177 178export let mockDietRecords: Array<DietRecord> = [ 179 { 180 id: 1, 181 foodId: 2, 182 mealTime: { name: $r('app.string.meal_time_dinner'), id: MealTimeId.Dinner }, 183 weight: 200 184 }, 185 { 186 id: 2, 187 foodId: 8, 188 mealTime: { name: $r('app.string.meal_time_dinner'), id: MealTimeId.Dinner }, 189 weight: 200 190 }, 191 { 192 id: 3, 193 foodId: 6, 194 mealTime: { name: $r('app.string.meal_time_lunch'), id: MealTimeId.Lunch }, 195 weight: 200 196 }, 197 { 198 id: 4, 199 foodId: 3, 200 mealTime: { name: $r('app.string.meal_time_dinner'), id: MealTimeId.Dinner }, 201 weight: 200 202 } 203]