TrafficPlus
Tables (7)
EmergencyAlerts
- alert_id — BIGINT — Primary key — NOT NULL
- region — GEOGRAPHY — NOT NULL
- alert_type — VARCHAR(50) — NOT NULL
- description — TEXT — NOT NULL
- created_at — DATETIME
ExternalData
- external_id — BIGINT — Primary key — NOT NULL
- provider_name — VARCHAR(100) — NOT NULL
- data_type — VARCHAR(50) — NOT NULL
- fetched_at — DATETIME — NOT NULL
- raw_data — JSON — NOT NULL
Notifications
- notification_id — BIGINT — Primary key — NOT NULL
- notification_type — VARCHAR(50) — NOT NULL
- message — TEXT — NOT NULL
- sent_at — DATETIME
- user_id — BIGINT — Foreign key → Users.user_id — NOT NULL
RecommendedRoutes
- route_id — BIGINT — Primary key — NOT NULL
- start_location — GEOGRAPHY — NOT NULL
- end_location — GEOGRAPHY — NOT NULL
- recommended_path — JSON — NOT NULL
- calculated_at — DATETIME — NOT NULL
- user_id — BIGINT — Foreign key → Users.user_id — NOT NULL
TrafficData
- data_id — BIGINT — Primary key — NOT NULL
- source_type — VARCHAR(50) — NOT NULL
- location — GEOGRAPHY — NOT NULL
- timestamp — DATETIME — NOT NULL
- vehicle_count — INT
- congestion_level — INT
- raw_data — JSON
- processed — BOOLEAN
UserLocations
- locatoin_id (locaton_id) — BIGINT — Primary key — NOT NULL
- location — GEOGRAPHY — NOT NULL
- timestamp — DATETIME — NOT NULL
- user_id — BIGINT — Foreign key → Users.user_id — NOT NULL
Users
- user_id — BIGINT — Primary key — NOT NULL
- username — VARCHAR(50) — NOT NULL
- email — VARCHAR(100) — NOT NULL
- password_hash — VARCHAR(255) — NOT NULL
- created_at — DATETIME
- updated_at — DATETIME