11
Tables (50)
admin_copy_blocks
- id — UUID — Primary key — NOT NULL
- slug — TEXT — NOT NULL
- locale — TEXT
- content — JSONB — NOT NULL
- version — INTEGER
- updated_by — TEXT — NOT NULL
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
admin_security_audit
- id — UUID — Primary key — NOT NULL
- action — TEXT — NOT NULL
- user_id — TEXT — NOT NULL
- details — JSONB
- ip_address — INET
- user_agent — TEXT
- created_at — TIMESTAMPTZ
allergies
- id — UUID — Primary key — NOT NULL
- code — VARCHAR(50) — NOT NULL
- name_ko — VARCHAR(200) — NOT NULL
- name_en — VARCHAR(200)
- category — VARCHAR(100)
- severity_level — VARCHAR(20)
- description — TEXT
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
allergy_derived_ingredients
- id — UUID — Primary key — NOT NULL
- allergy_code — VARCHAR(50)
- ingredient_name — VARCHAR(200) — NOT NULL
- ingredient_type — VARCHAR(50)
- description — TEXT
- created_at — TIMESTAMPTZ
cache_entries
- id — UUID — Primary key — NOT NULL
- cache_type — TEXT — NOT NULL
- cache_key — TEXT — NOT NULL
- cache_data — JSONB — NOT NULL
- user_id — UUID
- family_member_id — UUID
- expires_at — TIMESTAMPTZ — NOT NULL
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
calorie_calculation_formulas
- id — UUID — Primary key — NOT NULL
- formula_name — VARCHAR(100) — NOT NULL
- formula_type — VARCHAR(50)
- gender — VARCHAR(10)
- age_min — INTEGER
- age_max — INTEGER
- formula_expression — TEXT — NOT NULL
- description — TEXT
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
- user_id — UUID
consent_records
- id — UUID — Primary key — NOT NULL
- clerk_user_id — TEXT — NOT NULL
- consent_type — TEXT — NOT NULL
- consent_content — TEXT — NOT NULL
- consent_status — TEXT — NOT NULL
- consent_time — TIMESTAMPTZ — NOT NULL
- ip_address — INET
- user_agent — TEXT
- device_type — TEXT
- location_country — TEXT
- location_region — TEXT
- location_city — TEXT
- verification_id — UUID
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
deworming_medications
- id — UUID — Primary key — NOT NULL
- medication_name — TEXT — NOT NULL
- active_ingredient — TEXT — NOT NULL
- standard_dosage — TEXT — NOT NULL
- standard_cycle_days — INTEGER — NOT NULL
- target_parasites — ARRAY
- age_group — TEXT
- contraindications — ARRAY
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
diet_plans
- id — UUID — Primary key — NOT NULL
- user_id — UUID — NOT NULL
- family_member_id — UUID
- plan_date — DATE — NOT NULL
- meal_type — TEXT — NOT NULL
- recipe_id — UUID
- recipe_title — TEXT — NOT NULL
- recipe_description — TEXT
- ingredients — JSONB
- instructions — TEXT
- calories — INTEGER
- sodium_mg — INTEGER
- potassium_mg — INTEGER
- phosphorus_mg — INTEGER
- composition_summary — JSONB
- is_unified — BOOLEAN
- created_at — TIMESTAMPTZ
disease_excluded_foods_extended
- id — UUID — Primary key — NOT NULL
- disease_code — VARCHAR(50)
- food_name — VARCHAR(200) — NOT NULL
- food_type — VARCHAR(50)
- severity — VARCHAR(20)
- reason — TEXT
- exclusion_type — TEXT
- created_at — TIMESTAMPTZ
disease_records
- id — UUID — Primary key — NOT NULL
- user_id — UUID — NOT NULL
- family_member_id — UUID
- disease_name — TEXT — NOT NULL
- disease_code — TEXT
- diagnosis_date — DATE — NOT NULL
- hospital_name — TEXT
- hospital_record_id — UUID
- status — TEXT — NOT NULL
- severity — TEXT
- treatment_plan — TEXT
- data_source_id — UUID
- is_auto_synced — BOOLEAN
- notes — TEXT
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
diseases
- id — UUID — Primary key — NOT NULL
- code — VARCHAR(50) — NOT NULL
- name_ko — VARCHAR(200) — NOT NULL
- name_en — VARCHAR(200)
- category — VARCHAR(100)
- description — TEXT
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
emergency_procedures
- id — UUID — Primary key — NOT NULL
- allergy_code — VARCHAR(50)
- procedure_type — VARCHAR(50)
- title_ko — VARCHAR(200) — NOT NULL
- title_en — VARCHAR(200)
- steps — JSONB — NOT NULL
- warning_signs — JSONB
- when_to_call_911 — TEXT
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
family_members
- id — UUID — Primary key — NOT NULL
- user_id — UUID — NOT NULL
- name — TEXT — NOT NULL
- birth_date — DATE — NOT NULL
- gender — TEXT
- relationship — TEXT — NOT NULL
- diseases — ARRAY
- allergies — ARRAY
- height_cm — INTEGER
- activity_level — TEXT
- dietary_preferences — ARRAY
- include_in_unified_diet — BOOLEAN
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
- vaccination_history — JSONB
- last_health_checkup_date — DATE
favorite_meals
- id — UUID — Primary key — NOT NULL
- user_id — UUID — NOT NULL
- recipe_id — UUID
- recipe_title — TEXT — NOT NULL
- meal_type — TEXT
- calories — INTEGER
- notes — TEXT
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
health_data_sources
- id — UUID — Primary key — NOT NULL
- user_id — UUID — NOT NULL
- source_type — TEXT — NOT NULL
- source_name — TEXT — NOT NULL
- connection_status — TEXT — NOT NULL
- connected_at — TIMESTAMPTZ
- last_synced_at — TIMESTAMPTZ
- sync_frequency — TEXT
- connection_metadata — JSONB
- error_message — TEXT
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
health_data_sync_logs
- id — UUID — Primary key — NOT NULL
- user_id — UUID — NOT NULL
- data_source_id — UUID
- sync_type — TEXT — NOT NULL
- sync_status — TEXT — NOT NULL
- records_synced — INTEGER
- hospital_records_count — INTEGER
- medication_records_count — INTEGER
- disease_records_count — INTEGER
- checkup_records_count — INTEGER
- error_message — TEXT
- error_details — JSONB
- sync_duration_ms — INTEGER
- synced_at — TIMESTAMPTZ
- created_at — TIMESTAMPTZ
hospital_records
- id — UUID — Primary key — NOT NULL
- user_id — UUID — NOT NULL
- family_member_id — UUID
- visit_date — DATE — NOT NULL
- hospital_name — TEXT — NOT NULL
- hospital_code — TEXT
- department — TEXT
- diagnosis — ARRAY
- diagnosis_codes — ARRAY
- prescribed_medications — JSONB
- treatment_summary — TEXT
- data_source_id — UUID
- is_auto_synced — BOOLEAN
- notes — TEXT
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
identity_verifications
- id — UUID — Primary key — NOT NULL
- clerk_user_id — TEXT — NOT NULL
- name — TEXT — NOT NULL
- national_id_hash — TEXT — NOT NULL
- consent — BOOLEAN — NOT NULL
- status — TEXT — NOT NULL
- created_at — TIMESTAMPTZ
- verified_at — TIMESTAMPTZ
- family_member_id — UUID
image_cache_cleanup_logs
- id — UUID — Primary key — NOT NULL
- cleanup_date — TIMESTAMPTZ — NOT NULL
- images_removed — INTEGER
- cleanup_duration_ms — INTEGER
- cleanup_type — TEXT
- error_message — TEXT
- created_at — TIMESTAMPTZ
kcdc_alerts
- id — UUID — Primary key — NOT NULL
- alert_type — TEXT — NOT NULL
- title — TEXT — NOT NULL
- content — TEXT — NOT NULL
- severity — TEXT
- flu_stage — TEXT
- flu_week — TEXT
- vaccine_name — TEXT
- target_age_group — TEXT
- recommended_date — DATE
- source_url — TEXT
- published_at — TIMESTAMPTZ
- is_active — BOOLEAN
- priority — INTEGER
- fetched_at — TIMESTAMPTZ
- expires_at — TIMESTAMPTZ
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
kcdc_disease_outbreaks
- id — UUID — Primary key — NOT NULL
- disease_name — TEXT — NOT NULL
- disease_code — TEXT
- region — TEXT — NOT NULL
- outbreak_date — DATE — NOT NULL
- case_count — INTEGER
- severity — TEXT
- alert_level — TEXT
- description — TEXT
- source_url — TEXT
- fetched_at — TIMESTAMPTZ
- is_active — BOOLEAN
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
kcdc_health_checkup_statistics
- id — UUID — Primary key — NOT NULL
- checkup_type — TEXT — NOT NULL
- age_group — TEXT — NOT NULL
- gender — TEXT
- year — INTEGER — NOT NULL
- average_values — JSONB
- normal_ranges — JSONB
- fetched_at — TIMESTAMPTZ
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
legacy_documents
- id — UUID — Primary key — NOT NULL
- video_id — UUID
- title — TEXT — NOT NULL
- summary — TEXT — NOT NULL
- region — TEXT — NOT NULL
- era — TEXT — NOT NULL
- ingredients — JSONB
- tools — JSONB
- source — JSONB
- steps — JSONB
- created_at — TIMESTAMPTZ — NOT NULL
legacy_masters
- id — UUID — Primary key — NOT NULL
- name — TEXT — NOT NULL
- title — TEXT — NOT NULL
- region — TEXT — NOT NULL
- bio — TEXT
legacy_replacement_guides
- id — UUID — Primary key — NOT NULL
- traditional — JSONB — NOT NULL
- modern — JSONB — NOT NULL
- tips — ARRAY
- created_at — TIMESTAMPTZ — NOT NULL
legacy_videos
- id — UUID — Primary key — NOT NULL
- master_id — UUID
- slug — TEXT — NOT NULL
- title — TEXT — NOT NULL
- description — TEXT — NOT NULL
- duration_minutes — INTEGER — NOT NULL
- region — TEXT — NOT NULL
- era — TEXT — NOT NULL
- ingredients — ARRAY
- thumbnail_url — TEXT — NOT NULL
- video_url — TEXT — NOT NULL
- premium_only — BOOLEAN
- tags — ARRAY
- created_at — TIMESTAMPTZ — NOT NULL
lifecycle_vaccination_schedules
- id — UUID — Primary key — NOT NULL
- vaccine_name — TEXT — NOT NULL
- vaccine_code — TEXT
- target_age_min_months — INTEGER
- target_age_max_months — INTEGER
- priority — TEXT — NOT NULL
- dose_number — INTEGER — NOT NULL
- total_doses — INTEGER — NOT NULL
- interval_days — INTEGER
- gender_requirement — TEXT
- description — TEXT
- source — TEXT
- is_active — BOOLEAN
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
meal_kit_products
- id — UUID — Primary key — NOT NULL
- coupang_product_id — TEXT — NOT NULL
- name — TEXT — NOT NULL
- description — TEXT
- image_url — TEXT
- price — INTEGER — NOT NULL
- original_price — INTEGER
- discount_rate — INTEGER
- product_url — TEXT — NOT NULL
- affiliate_link — TEXT
- calories — INTEGER
- category — TEXT
- meal_type — ARRAY
- last_synced_at — TIMESTAMPTZ
- sync_status — TEXT
- sync_error — TEXT
- is_active — BOOLEAN
- is_available — BOOLEAN
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
meal_kits
- id — UUID — Primary key — NOT NULL
- name — TEXT — NOT NULL
- description — TEXT
- image_url — TEXT
- price — INTEGER — NOT NULL
- serving_size — INTEGER
- calories — INTEGER
- category — TEXT
- meal_type — ARRAY
- purchase_url — TEXT
- is_active — BOOLEAN
- is_premium_only — BOOLEAN
- created_by — UUID
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
medication_interactions
- id — UUID — Primary key — NOT NULL
- medication_a — TEXT — NOT NULL
- medication_b — TEXT — NOT NULL
- interaction_level — TEXT — NOT NULL
- description — TEXT
- recommendation — TEXT
- source — TEXT — NOT NULL
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
medication_records
- id — UUID — Primary key — NOT NULL
- user_id — UUID — NOT NULL
- family_member_id — UUID
- medication_name — TEXT — NOT NULL
- medication_code — TEXT
- active_ingredient — TEXT
- dosage — TEXT — NOT NULL
- frequency — TEXT — NOT NULL
- start_date — DATE — NOT NULL
- end_date — DATE
- reminder_times — ARRAY
- reminder_enabled — BOOLEAN
- hospital_record_id — UUID
- data_source_id — UUID
- is_auto_synced — BOOLEAN
- notes — TEXT
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
notifications
- id — UUID — Primary key — NOT NULL
- user_id — UUID
- family_member_id — UUID
- type — TEXT — NOT NULL
- category — TEXT
- channel — TEXT
- title — TEXT
- message — TEXT
- status — TEXT — NOT NULL
- priority — TEXT
- context_data — JSONB
- scheduled_at — TIMESTAMPTZ
- sent_at — TIMESTAMPTZ
- read_at — TIMESTAMPTZ
- confirmed_at — TIMESTAMPTZ
- related_id — UUID
- related_type — TEXT
- recipient — TEXT
- error_message — TEXT
- retry_count — INTEGER
- is_test — BOOLEAN
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
payment_transactions
- id — UUID — Primary key — NOT NULL
- subscription_id — UUID
- user_id — UUID — NOT NULL
- status — TEXT — NOT NULL
- transaction_type — TEXT — NOT NULL
- pg_provider — TEXT — NOT NULL
- pg_transaction_id — TEXT
- amount — INTEGER — NOT NULL
- tax_amount — INTEGER
- net_amount — INTEGER — NOT NULL
- payment_method — TEXT
- card_info — JSONB
- paid_at — TIMESTAMPTZ
- refunded_at — TIMESTAMPTZ
- metadata — JSONB
- is_test_mode — BOOLEAN
- created_at — TIMESTAMPTZ
popup_announcements
- id — UUID — Primary key — NOT NULL
- title — TEXT — NOT NULL
- body — TEXT — NOT NULL
- active_from — TIMESTAMPTZ — NOT NULL
- active_until — TIMESTAMPTZ
- status — TEXT — NOT NULL
- priority — INTEGER
- target_segments — JSONB
- metadata — JSONB
- image_url — TEXT
- link_url — TEXT
- display_type — TEXT
- created_by — TEXT — NOT NULL
- updated_by — TEXT — NOT NULL
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
promo_code_uses
- id — UUID — Primary key — NOT NULL
- promo_code_id — UUID — NOT NULL
- user_id — UUID — NOT NULL
- subscription_id — UUID
- used_at — TIMESTAMPTZ
promo_codes
- id — UUID — Primary key — NOT NULL
- code — TEXT — NOT NULL
- discount_type — TEXT — NOT NULL
- discount_value — INTEGER — NOT NULL
- max_uses — INTEGER
- current_uses — INTEGER
- valid_from — TIMESTAMPTZ — NOT NULL
- valid_until — TIMESTAMPTZ — NOT NULL
- applicable_plans — ARRAY
- new_users_only — BOOLEAN
- description — TEXT
- created_by — UUID
- created_at — TIMESTAMPTZ
recipe_ingredients
- id — UUID — Primary key — NOT NULL
- recipe_id — UUID — NOT NULL
- name — TEXT — NOT NULL
- ingredient_name — TEXT
- unit — TEXT
- notes — TEXT
- display_order — INTEGER — NOT NULL
- category — ingredient_category
- is_optional — BOOLEAN
- preparation_note — TEXT
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ
recipe_rating_stats
- recipe_id — UUID
- rating_count — BIGINT
recipe_ratings
- id — UUID — Primary key — NOT NULL
- recipe_id — UUID — NOT NULL
- user_id — UUID — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL
recipe_reports
- id — UUID — Primary key — NOT NULL
- recipe_id — UUID — NOT NULL
- user_id — UUID — NOT NULL
- report_type — TEXT — NOT NULL
- reason — TEXT — NOT NULL
- status — TEXT — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL
recipe_steps
- id — UUID — Primary key — NOT NULL
- recipe_id — UUID — NOT NULL
- step_number — INTEGER — NOT NULL
- content — TEXT — NOT NULL
- image_url — TEXT
- video_url — TEXT
- timer_minutes — INTEGER
- foodsafety_manual_img — TEXT
- created_at — TIMESTAMPTZ — NOT NULL
recipe_usage_history
- id — UUID — Primary key — NOT NULL
- user_id — UUID — NOT NULL
- family_member_id — UUID
- recipe_title — TEXT — NOT NULL
- recipe_url — TEXT
- meal_type — TEXT
- used_date — DATE — NOT NULL
- created_at — TIMESTAMPTZ
recipes
- id — UUID — Primary key — NOT NULL
- user_id — UUID
- slug — TEXT — NOT NULL
- title — TEXT — NOT NULL
- description — TEXT
- thumbnail_url — TEXT
- difficulty — INTEGER — NOT NULL
- cooking_time_minutes — INTEGER — NOT NULL
- servings — INTEGER
- foodsafety_rcp_seq — TEXT
- foodsafety_rcp_way2 — TEXT
- foodsafety_rcp_pat2 — TEXT
- foodsafety_rcp_parts_dtls — TEXT
- foodsafety_att_file_no_main — TEXT
- foodsafety_att_file_no_mk — TEXT
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL
royal_recipes_posts
- id — UUID — Primary key — NOT NULL
- title — TEXT — NOT NULL
- content — TEXT — NOT NULL
- era — TEXT — NOT NULL
- author_id — TEXT — NOT NULL
- slug — TEXT — NOT NULL
- published — BOOLEAN — NOT NULL
- thumbnail_url — TEXT
- excerpt — TEXT
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL
subscriptions
- id — UUID — Primary key — NOT NULL
- user_id — UUID — NOT NULL
- status — TEXT — NOT NULL
- plan_type — TEXT — NOT NULL
- billing_key — TEXT
- payment_method — TEXT
- last_four_digits — TEXT
- started_at — TIMESTAMPTZ — NOT NULL
- current_period_start — TIMESTAMPTZ — NOT NULL
- current_period_end — TIMESTAMPTZ — NOT NULL
- cancelled_at — TIMESTAMPTZ
- price_per_month — INTEGER — NOT NULL
- total_paid — INTEGER
- is_test_mode — BOOLEAN
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
user_deworming_records
- id — UUID — Primary key — NOT NULL
- user_id — UUID — NOT NULL
- family_member_id — UUID
- medication_name — TEXT — NOT NULL
- dosage — TEXT — NOT NULL
- taken_date — DATE — NOT NULL
- next_due_date — DATE
- cycle_days — INTEGER
- prescribed_by — TEXT
- notes — TEXT
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
user_health_checkup_recommendations
- id — UUID — Primary key — NOT NULL
- user_id — UUID — NOT NULL
- family_member_id — UUID — NOT NULL
- checkup_type — TEXT — NOT NULL
- checkup_name — TEXT — NOT NULL
- recommended_date — DATE — NOT NULL
- priority — TEXT — NOT NULL
- overdue — BOOLEAN
- last_checkup_date — DATE
- age_requirement — TEXT
- gender_requirement — TEXT
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
user_health_checkup_records
- id — UUID — Primary key — NOT NULL
- user_id — UUID — NOT NULL
- family_member_id — UUID
- checkup_type — TEXT — NOT NULL
- checkup_date — DATE — NOT NULL
- checkup_site — TEXT
- checkup_site_address — TEXT
- results — JSONB
- next_recommended_date — DATE
- overdue_days — INTEGER
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ
user_settings
- id — UUID — Primary key — NOT NULL
- user_id — UUID — NOT NULL
- setting_category — TEXT — NOT NULL
- settings — JSONB — NOT NULL
- created_at — TIMESTAMPTZ
- updated_at — TIMESTAMPTZ