DDOYA
Tables (21)
ai_model
- model_id — BIGINT — Primary key — NOT NULL
- model_name — VARCHAR — NOT NULL
- download_url — VARCHAR — NOT NULL
- sha256 — CHAR — NOT NULL
- is_active — BOOL — NOT NULL
- created_at — DATETIME — NOT NULL
body_part
- body_part_id — TINYINT — Primary key — NOT NULL — AUTO_INCREMENT
- body_part_name — VARCHAR(50) — UNIQUE
device_token
- device_token_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — NOT NULL
- device_type — ENUM('ANDROID', 'IOS')
- fcm_token — VARCHAR — NOT NULL
- is_active — BIT — NOT NULL
- created_at — DATETIME
- updated_at — DATETIME
ingredient_interaction
- interaction_id — BIGINT — Primary key — NOT NULL
- ingredient_a — BIGINT — NOT NULL
- ingredient_b — BIGINT — NOT NULL
- type — ENUM('ANTAGONIST', 'SYNERGY')
- min_interval_hours — INT
- note — VARCHAR(200)
ingredient_master
- ingredient_id — BIGINT — Primary key — NOT NULL
- normalized_name — VARCHAR(100) — NOT NULL
- ri_adult_m — DECIMAL
- ri_adult_f — DECIMAL
- ri_non_adult — DECIMAL
- ri_pregnant — DECIMAL
- ul_adult_m — DECIMAL
- ul_adult_f — DECIMAL
- ul_non_adult — DECIMAL
- ul_pregnant — DECIMAL
- unit — VARCHAR(20) — NOT NULL
- solubility — ENUM('FAT','WATER')
- gi_irritant — BIT(1)
- effect — ENUM('ENERGY','RELAX','GUT','NEUTRAL')
- absorption_note — VARCHAR(500)
- synonyms — JSON
- parent_id — BIGINT — NOT NULL
intake_record
- intake_record_id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
- schedule_id — BIGINT — NOT NULL
- planned_at — DATETIME — NOT NULL — yyyy-mm-dd hh:mm
- status — ENUM('TAKEN', 'MISSED', 'SKIPPED') — NOT NULL — 섭취 완료/미섭취/스킵
- action_at — DATETIME — yyyy-mm-dd hh:mm
intake_schedule
- schedule_id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
- user_id — BIGINT — NOT NULL
- user_supplement_id — BIGINT — 챙김 알림이면 NULL
- intake_time — TIME — NOT NULL — HH:mm
- schedule_type — ENUM('INTAKE', 'CARRY') — NOT NULL — 섭취/챙김
- dose_per_intake — INT — 챙김 알림이면 NULL
- is_active — BIT(1) — NOT NULL — 활성/비활성
notification_delivery_log
- delivery_log_id — BIGINT — AUTO_INCREMENT
- user_id — BIGINT — NOT NULL — AUTO_INCREMENT
- schedule_id — BIGINT
- intake_record_id — BIGINT — NOT NULL — AUTO_INCREMENT
- sent_at — DATETIME — NOT NULL
- attempt_no — INT — NOT NULL — 재알림 회차
- is_deleted — BOOLEAN — NOT NULL — 알림 삭제 여부
- title — VARCHAR(100) — NOT NULL
- body — VARCHAR(255) — NOT NULL
- related_id — BIGINT
- type — ENUM('CARRY', 'INTAKE', 'REPURCHASE', 'TEST') — NOT NULL
products
- product_code — VARCHAR(30) — Primary key — NOT NULL
- product_name — VARCHAR(200) — NOT NULL
- product_type — VARCHAR(100) — NOT NULL
- manufacturer — VARCHAR(200)
- serving_size — VARCHAR(50)
- daily_serving — VARCHAR(10)
- calcium — DECIMAL
- iron — DECIMAL
- vitamin_a — DECIMAL
- vitamin_c — DECIMAL
- vitamin_d — DECIMAL
- thiamin — DECIMAL
- riboflavin — DECIMAL
- niacin — DECIMAL
refresh_tokens
- id — BIGINT — Primary key — NOT NULL — AUTO INCREMENT
- user_id — BIGINT — NOT NULL — AUTO_INCREMENT
- token — VARCHAR(512) — NOT NULL
- expires_at — DATETIME(6) — NOT NULL
report
- report_id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
- user_id — BIGINT — NOT NULL — UNIQUE
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME
- needs_refresh — BOOLEAN — NOT NULL
report_comments
- report_id — BIGINT — Foreign key → report.report_id — NOT NULL
- excess_comment — TEXT — NOT NULL
- deficiency_comment — TEXT — NOT NULL
- product_comment — TEXT — NOT NULL
- schedule_comment — TEXT — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME
report_ingredient_analysis
- report_ingredient_analysis_id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
- report_id — BIGINT — Foreign key → report.report_id — NOT NULL
- ingredient_id — BIGINT — NOT NULL
- normalized_ingredient_name — VARCHAR(100) — NOT NULL
- recommended_amount — DECIMAL
- current_amount — DECIMAL
- excess_ratio — DECIMAL
- excess_amount — DECIMAL
- deficiency_ratio — DECIMAL
- deficiency_amount — DECIMAL
- unit — VARCHAR(20) — NOT NULL
- analysis_type — ENUM('EXCESS', 'DEFICIENCY', 'NORMAL')
report_intake_timing_recommendation
- timing_recommendation_id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
- report_id — BIGINT — NOT NULL
- user_supplement_id — BIGINT — NOT NULL
- intake_timing — Enum — NOT NULL
report_recommended_product
- report_recommended_product_id — BIGINT — Primary key — NOT NULL
- report_id — BIGINT — NOT NULL — AUTO_INCREMENT
- product_code — VARCHAR(50) — NOT NULL
- ingredient_id — BIGINT — NOT NULL
supplement_inventory
- inventory_id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
- user_supplement_id — BIGINT — NOT NULL — UNIQUE
- stock_quantity — INT — NOT NULL
- stock_alert_enabled — BOOLEAN — NOT NULL
supplements
- user_supplement_id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
- user_id — BIGINT — NOT NULL
- alias — VARCHAR(50) — NOT NULL
- daily_dose — INT — NOT NULL
- dose_per_intake — INT — NOT NULL
- capacity — INT — NOT NULL
- is_reflected — BOOLEAN — NOT NULL
- pill_image_url — VARCHAR(500) — NOT NULL
- body_part_id — TINYINT — NOT NULL
- created_at — DATEYIME — NOT NULL
- pill_reference_embedding_path — VARCHAR(500) — NOT NULL
user_intake_timing_setting
- user_intake_timing_setting_id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
- user_id — BIGINT — NOT NULL — AUTO_INCREMENT
- intake_timing — ENUM — NOT NULL
- intake_time — TIME — NOT NULL — HH:mm
user_notification_setting
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- intake_notification_enabled — BOOLEAN — NOT NULL
- carry_notification_enabled — BOOLEAN — NOT NULL
- stock_notification_enabled — BOOLEAN — NOT NULL
user_supplement_ingredient
- user_supplement_id — BIGINT — Foreign key → supplements.user_supplement_id — NOT NULL
- normalized_ingredient_id — BIGINT — Foreign key → ingredient_master.ingredient_id — NOT NULL
- raw_ingredient_name — VARCHAR(200) — NOT NULL
- unit — VARCHAR(20) — NOT NULL
- amount — DECIMAL — NOT NULL
- is_primary — TINYINT — NOT NULL
users
- user_id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
- email — VARCHAR(100) — NOT NULL — UNIQUE
- password — VARCHAR(255) — NOT NULL
- nickname — VARCHAR(50) — NOT NULL
- gender — ENUM('MALE', 'FEMALE') — NOT NULL
- birth_date — DATE — NOT NULL
- height_cm — DECIMAL — NOT NULL
- weight_kg — DECIMAL — NOT NULL
- create_at — DATETIME — NOT NULL