elderly
Tables (4)
alert_logs
- id — INT — Primary key — NOT NULL
- user_id — INT — Foreign key → users.id — NOT NULL
- event_id — INT — Foreign key → detection_events.id — NOT NULL
- alert_type — VARCHAR(50) — NOT NULL
- message — TEXT — NOT NULL
- status — VARCHAR(20) — NOT NULL
- sent_at — DATETIME — NOT NULL
- read_at — DATETIME
detection_events
- id — INT — Primary key — NOT NULL
- device_id — INT — Foreign key → devices.id — NOT NULL
- event_type — VARCHAR(50) — NOT NULL
- confidence_score — FLOAT — NOT NULL
- image_path — VARCHAR(500)
- metadata — JSON
- detected_at — DATETIME — NOT NULL
- is_processed — BOOLEAN
devices
- id — INT — Primary key — NOT NULL
- user_id — INT — Foreign key → users.id — NOT NULL
- device_name — VARCHAR(100) — NOT NULL
- device_type — VARCHAR(50) — NOT NULL
- location — VARCHAR(200)
- ip_address — VARCHAR(45)
- status — VARCHAR(20) — NOT NULL
- last_heartbeat — DATETIME
- registered_at — DATETIME — NOT NULL
users
- id — INT — Primary key — NOT NULL
- username — VARCHAR(50) — NOT NULL
- email — VARCHAR(100) — NOT NULL
- password_hash — VARCHAR(255) — NOT NULL
- role — VARCHAR(20) — NOT NULL
- phone_number — VARCHAR(20)
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL