# 09. Data Model

## Entities

### User

- id
- role: owner, admin, master
- name
- email
- phone
- status

### Client

- id
- name
- phone
- email
- notes
- created_at

### Service

- id
- title
- description
- duration_minutes
- price
- status

### Master

- id
- user_id
- display_name
- services
- working_hours
- status

### Booking

- id
- client_id
- service_id
- master_id
- starts_at
- ends_at
- status: draft, confirmed, completed, cancelled, no_show
- source
- notes
- created_at
- updated_at

### Payment

- id
- booking_id
- amount
- status: pending, paid, refunded, failed
- provider
- provider_reference

### Notification

- id
- booking_id
- channel
- template
- status: queued, sent, failed
- sent_at

## Analytics Events

- booking_started
- service_selected
- slot_selected
- booking_confirmed
- booking_cancelled
- reminder_sent
- booking_completed
- no_show_marked
