DB_AR

Tables (7)

auth

  • Key (id) — NOT NULL — Primary key — NOT NULL
  • Key (user_id) — NOT NULL — Foreign key → user_info.Key — NOT NULL
  • Field (access_token) — NOT NULL
  • token_generate_time (access_created_at) — NOT NULL
  • expired_at (access_expired_at) — NOT NULL
  • Field (refresh_token) — NOT NULL
  • Field (refresh_created_at) — NOT NULL
  • Field2 (refresh_expired_at) — NOT NULL

food_list

  • Food_id (id) — NOT NULL — Primary key — NOT NULL
  • Category_id (category_id) — NOT NULL
  • Food_name (food_name) — NOT NULL
  • Category_name (category_name) — NOT NULL
  • Food_kcal (food_kcal) — NOT NULL
  • Food_carbohydrate (food_car) — NOT NULL
  • Food_protein (food_prot) — NOT NULL
  • Food_province (food_fat) — NOT NULL

history

  • history_id (id) — NOT NULL — Primary key — NOT NULL
  • Key (user_id) — NOT NULL — Foreign key → user_info.Key — NOT NULL
  • Food_id (food_id) — NOT NULL — Foreign key → food_list.Food_id — NOT NULL
  • Meal_type_id (meal_type_id) — NOT NULL — Foreign key → meal_type.Meal_type_id — NOT NULL
  • Image_url (image_url) — NOT NULL
  • Key (date) — NOT NULL — NOT NULL
  • Field (created_at) — NOT NULL
  • Field (updated_at) — NOT NULL

meal_type

  • Meal_type_id (id) — NOT NULL — Primary key — NOT NULL
  • Type_name (type_name) — NOT NULL — NOT NULL

recommend_amount (recommend)

  • Amount_id (id) — NOT NULL — Primary key — NOT NULL
  • Key (user_id) — NOT NULL — Foreign key → user_info.Key — NOT NULL
  • Recommend_kcal (rec_kcal) — NOT NULL
  • Recommend_carbohydrate (rec_car) — NOT NULL
  • Recommend_protein (rec_prot) — NOT NULL
  • Recommend_province (rec_fat) — NOT NULL
  • Updated_at (updated_at) — NOT NULL

total_today

  • Total_id (id) — NOT NULL — Primary key — NOT NULL
  • Key (user_id) — NOT NULL — Foreign key → user_info.Key — NOT NULL
  • Total_kcal (total_kcal) — NOT NULL
  • Total_ carbohydrate (total_car) — NOT NULL
  • Total_protein (total_prot) — NOT NULL
  • Total_province (total_fat) — NOT NULL
  • Condition (condition) — NOT NULL
  • Field (created_at) — NOT NULL
  • Field (updated_at) — NOT NULL
  • Key (today) — NOT NULL — NOT NULL
  • Field (history_ids) — NOT NULL

user_info

  • Key (id) — NOT NULL — Primary key — NOT NULL
  • Age (age) — NOT NULL
  • Gender (gender) — NOT NULL
  • Height (height) — NOT NULL
  • Weight (weight) — NOT NULL
  • Birthday (birthday) — NOT NULL
  • email — NOT NULL
  • nickname — NOT NULL
  • Field (created_at) — NOT NULL
  • Updated_at (updated_at) — NOT NULL