ㅇ

Tables (22)

alembic_version

  • version_num — character varying — Primary key — NOT NULL

chat_logs

  • id — integer — Primary key — NOT NULL
  • user_id — integer — Foreign key → users.id — NOT NULL
  • role — character varying — NOT NULL
  • message — character varying — NOT NULL
  • emotion — character varying
  • created_at — timestamp without time zone

chat_session

  • session_id — uuid — Primary key — NOT NULL
  • senior_id — uuid — NOT NULL
  • started_at — timestamp without time zone — NOT NULL
  • ended_at — timestamp without time zone
  • messages — jsonb — NOT NULL
  • created_at — timestamp without time zone — NOT NULL

family_group

  • family_group_id — uuid — Primary key — NOT NULL
  • name — character varying — NOT NULL
  • created_by_guardian_id — uuid — Foreign key → guardian.guardian_id — NOT NULL
  • status — character varying — NOT NULL
  • created_at — timestamp without time zone — NOT NULL
  • updated_at — timestamp without time zone — NOT NULL

guardian

  • guardian_id — uuid — Primary key — NOT NULL
  • email — character varying — NOT NULL
  • name — character varying — NOT NULL
  • birth_date — timestamp without time zone — NOT NULL
  • gender — character varying
  • phone — character varying — NOT NULL
  • fcm_token — character varying
  • biometric_consent_yn — boolean — NOT NULL
  • consent_at — timestamp without time zone
  • is_deleted — boolean — NOT NULL
  • created_at — timestamp without time zone — NOT NULL
  • updated_at — timestamp without time zone
  • push_enabled — boolean — NOT NULL
  • medication_push_enabled — boolean — NOT NULL
  • hospital_push_enabled — boolean — NOT NULL

guardian_member

  • guardian_member_id — uuid — Primary key — NOT NULL
  • family_group_id — uuid — Foreign key → family_group.family_group_id — NOT NULL
  • guardian_id — uuid — Foreign key → guardian.guardian_id
  • guardian_name — character varying — NOT NULL
  • member_role — character varying — NOT NULL
  • status — character varying — NOT NULL
  • invited_by_guardian_id — uuid — Foreign key → guardian.guardian_id
  • invite_code — character varying
  • invite_expires_at — timestamp without time zone
  • joined_at — timestamp without time zone
  • created_at — timestamp without time zone — NOT NULL

guardian_senior

  • link_id — uuid — Primary key — NOT NULL
  • guardian_id — uuid — Foreign key → guardian.guardian_id — NOT NULL
  • senior_id — uuid — Foreign key → senior.senior_id — NOT NULL
  • link_status — character varying — NOT NULL
  • linked_at — timestamp without time zone
  • created_at — timestamp without time zone — NOT NULL
  • updated_at — timestamp without time zone

hospital_visit

  • visit_id — uuid — Primary key — NOT NULL
  • senior_id — uuid — Foreign key → senior.senior_id — NOT NULL
  • guardian_id — uuid — Foreign key → guardian.guardian_id — NOT NULL
  • hospital_name — character varying — NOT NULL
  • is_active — boolean — NOT NULL
  • created_at — timestamp without time zone — NOT NULL
  • updated_at — timestamp without time zone
  • visit_date — date — NOT NULL
  • visit_time — time without time zone — NOT NULL
  • memo — character varying

invite

  • token — character varying — Primary key — NOT NULL
  • guardian_id — uuid — Foreign key → guardian.guardian_id — NOT NULL
  • created_at — timestamp without time zone — NOT NULL
  • expired_at — timestamp without time zone — NOT NULL
  • is_used — boolean — NOT NULL
  • senior_name — character varying

medication

  • medication_id — uuid — Primary key — NOT NULL
  • senior_id — uuid — Foreign key → senior.senior_id — NOT NULL
  • guardian_id — uuid — Foreign key → guardian.guardian_id — NOT NULL
  • medicine_name — character varying — NOT NULL
  • intake_time — time without time zone — NOT NULL
  • start_date — date — NOT NULL
  • end_date — date
  • is_active — boolean — NOT NULL
  • created_at — timestamp without time zone — NOT NULL
  • updated_at — timestamp without time zone

medication_reminder

  • reminder_id — uuid — Primary key — NOT NULL
  • medication_id — uuid — Foreign key → medication.medication_id — NOT NULL
  • senior_id — uuid — Foreign key → senior.senior_id — NOT NULL
  • scheduled_for — timestamp without time zone — NOT NULL
  • status — character varying — NOT NULL
  • reminder_count — integer — NOT NULL
  • retry_at — timestamp without time zone
  • opened_at — timestamp without time zone
  • completed_at — timestamp without time zone
  • created_at — timestamp without time zone — NOT NULL
  • updated_at — timestamp without time zone

monthly_report

  • report_id — uuid — Primary key — NOT NULL
  • senior_id — uuid — Foreign key → senior.senior_id — NOT NULL
  • report_month — character varying — NOT NULL
  • pdf_url — character varying — NOT NULL
  • created_at — timestamp without time zone — NOT NULL

notification

  • notification_id — uuid — Primary key — NOT NULL
  • guardian_id — uuid — Foreign key → guardian.guardian_id — NOT NULL
  • senior_id — uuid — Foreign key → senior.senior_id — NOT NULL
  • prediction_id — uuid — Foreign key → risk_prediction.prediction_id
  • medication_id — uuid — Foreign key → medication.medication_id
  • notification_type — character varying — NOT NULL
  • status — character varying — NOT NULL
  • sent_at — timestamp without time zone — NOT NULL
  • hospital_visit_id — uuid — Foreign key → hospital_visit.visit_id

reconnect_code

  • code — character varying — Primary key — NOT NULL
  • senior_id — uuid — Foreign key → senior.senior_id — NOT NULL
  • guardian_id — uuid — Foreign key → guardian.guardian_id — NOT NULL
  • created_at — timestamp without time zone — NOT NULL
  • expired_at — timestamp without time zone — NOT NULL
  • is_used — boolean — NOT NULL

risk_prediction

  • prediction_id — uuid — Primary key — NOT NULL
  • senior_id — uuid — Foreign key → senior.senior_id — NOT NULL
  • parkinson_score — numeric — NOT NULL
  • dementia_score — numeric — NOT NULL
  • depression_score — numeric — NOT NULL
  • diabetes_score — numeric — NOT NULL
  • parkinson_level — character varying — NOT NULL
  • dementia_level — character varying — NOT NULL
  • depression_level — character varying — NOT NULL
  • diabetes_level — character varying — NOT NULL
  • created_at — timestamp without time zone — NOT NULL

script

  • script_id — uuid — Primary key — NOT NULL
  • content — character varying — NOT NULL
  • created_at — timestamp without time zone — NOT NULL

script_record

  • record_id — uuid — Primary key — NOT NULL
  • senior_id — uuid — Foreign key → senior.senior_id — NOT NULL
  • script_id — uuid — Foreign key → script.script_id — NOT NULL
  • measured_at — timestamp without time zone — NOT NULL
  • created_at — timestamp without time zone — NOT NULL

senior

  • senior_id — uuid — Primary key — NOT NULL
  • email — character varying — NOT NULL
  • name — character varying — NOT NULL
  • birth_date — timestamp without time zone — NOT NULL
  • gender — character varying
  • phone — character varying — NOT NULL
  • fcm_token — character varying
  • smoking_yn — boolean
  • bmi — numeric
  • medical_history — character varying
  • biometric_consent_yn — boolean — NOT NULL
  • consent_at — timestamp without time zone
  • is_deleted — boolean — NOT NULL
  • created_at — timestamp without time zone — NOT NULL
  • updated_at — timestamp without time zone
  • push_enabled — boolean — NOT NULL
  • medication_push_enabled — boolean — NOT NULL
  • hospital_push_enabled — boolean — NOT NULL

urgent_alert

  • alert_id — uuid — Primary key — NOT NULL
  • senior_id — uuid — Foreign key → senior.senior_id — NOT NULL
  • session_id — uuid
  • level — character varying — NOT NULL
  • rule_id — character varying
  • alert_status — character varying — NOT NULL
  • created_at — timestamp without time zone — NOT NULL

users

  • id — integer — Primary key — NOT NULL
  • email — character varying — NOT NULL
  • password — character varying — NOT NULL
  • name — character varying — NOT NULL
  • role — USER-DEFINED — NOT NULL
  • created_at — timestamp without time zone

voice_feature

  • feature_id — uuid — Primary key — NOT NULL
  • senior_id — uuid — Foreign key → senior.senior_id — NOT NULL
  • collect_type — character varying — NOT NULL
  • voice_features — jsonb — NOT NULL
  • measured_at — timestamp without time zone — NOT NULL
  • created_at — timestamp without time zone — NOT NULL

voice_records

  • id — integer — Primary key — NOT NULL
  • user_id — integer — Foreign key → users.id — NOT NULL
  • transcript — character varying
  • f0_mean — double precision
  • f0_std — double precision
  • jitter_rap — double precision
  • shimmer_apq — double precision
  • shimmer_local — double precision
  • shimmer_apq3 — double precision
  • shimmer_apq11 — double precision
  • hnr — double precision
  • nhr — double precision
  • mpt — double precision
  • vsa_area — double precision
  • pause_ratio — double precision
  • speech_rate — double precision
  • alpha_ratio — double precision
  • spectral_centroid — double precision
  • score — double precision
  • status — USER-DEFINED
  • created_at — timestamp without time zone