차량예약 및 공유 ERD
테이블 (7)
Accident
- Key (id) — 기본 키 — NOT NULL
- Key (dispatch_id) — 외래 키 → Dispatch.Key — NOT NULL
- Key — 외래 키 → Dispatch.Key — NOT NULL
- Field (accident_date)
- Field2 (description)
- Field3 (status)
- Field4 (created_at)
- Field5 (updated_at)
Dispatch
- Key2 (id) — 기본 키 — NOT NULL
- Key (dispatch_id) — 기본 키 — NOT NULL
- id (user_id) — 외래 키 → User.id — NOT NULL
- Key (vehicle_id) — 외래 키 → Vehivcle.Key — NOT NULL
- Key — 외래 키 → User.Key — NOT NULL
- Field (start_time)
- Field2 (end_time)
- Field3 (route)
- Field4 (status)
- Field5 (created_at)
- Field6 (updated_at)
Income
- Key3 (id) — 기본 키 — NOT NULL
- Key (reservation_id) — 외래 키 → Reservation.Key — NOT NULL
- Key (vehicle_id) — 외래 키 → Vehivcle.Key — NOT NULL
- Field (amount)
- Field2 (payment_date)
- Field3 (payment_method)
- Field4 (created_at)
- Field5 (updated_at)
Reservation
- Key2 (id) — 기본 키 — NOT NULL
- Key (reservation_id) — 기본 키 — NOT NULL
- id (user_id) — 외래 키 → User.id — NOT NULL
- Key (vehicle_id) — 외래 키 → Vehivcle.Key — NOT NULL
- Field (reservation_time)
- Field2 (status)
- Field3 (total_price)
- Field4 (created_at)
- Field5 (pdated_at)
Untitled7 (Notice)
- Key2 (id) — 외래 키 → Reservation.Key2 — NOT NULL
- Field (title)
- Field2 (message)
- Field3 (created_at)
- Field4 (updated_at)
User
- Key (id) — 기본 키 — NOT NULL
- id (user_id) — 기본 키 — NOT NULL
- username
- email
- password
- role
- created_at
- updated_at
Vehivcle (Vehicle)
- Key (id) — 기본 키 — NOT NULL
- Key (vehicle_id) — 기본 키 — NOT NULL
- Field2 (model)
- Field3 (status)
- Field4 (last_maintenance)
- Field5 (created_at)
- Field (updated_at)