# Model danych Core 0.1

Schemat ma 20 tabel. Wszystkie klucze główne i obce używają typu `BIGINT UNSIGNED`, aby uniknąć błędu MySQL 3780 o niezgodności typów FK.

Główne encje: roles, users, patients, locations, providers, consultation_types, schedules, appointments, payment_orders, patient_passports, patient_tasks, files, messages, mail_queue, audit_logs.

Formalne identyfikatory OpenCare są tylko polami technicznymi: `opencare_patient_id`, `opencare_visit_id`.
