feat(backend): implement v2 domain slice and live smoke
This commit is contained in:
@@ -96,6 +96,8 @@ erDiagram
|
||||
| `shift_managers` | `id` | `shift_id -> shifts.id`, `team_member_id -> team_members.id` | `(shift_id, team_member_id)` |
|
||||
| `applications` | `id` | `tenant_id -> tenants.id`, `shift_id -> shifts.id`, `role_id -> roles.id`, `staff_id -> staffs.id` | `(shift_id, role_id, staff_id)` |
|
||||
| `assignments` | `id` | `tenant_id -> tenants.id`, `shift_role_id -> shift_roles.id`, `workforce_id -> workforce.id` | `(shift_role_id, workforce_id)` active |
|
||||
| `staff_reviews` | `id` | `tenant_id -> tenants.id`, `business_id -> businesses.id`, `staff_id -> staffs.id`, `assignment_id -> assignments.id` | `(business_id, assignment_id, staff_id)` |
|
||||
| `staff_favorites` | `id` | `tenant_id -> tenants.id`, `business_id -> businesses.id`, `staff_id -> staffs.id` | `(business_id, staff_id)` |
|
||||
|
||||
### 4.2 Diagram
|
||||
|
||||
@@ -122,6 +124,11 @@ erDiagram
|
||||
STAFFS ||--o{ APPLICATIONS : applies
|
||||
SHIFT_ROLES ||--o{ ASSIGNMENTS : allocates
|
||||
WORKFORCE ||--o{ ASSIGNMENTS : executes
|
||||
BUSINESSES ||--o{ STAFF_REVIEWS : rates
|
||||
STAFFS ||--o{ STAFF_REVIEWS : receives
|
||||
ASSIGNMENTS ||--o{ STAFF_REVIEWS : references
|
||||
BUSINESSES ||--o{ STAFF_FAVORITES : favorites
|
||||
STAFFS ||--o{ STAFF_FAVORITES : selected
|
||||
```
|
||||
```
|
||||
|
||||
@@ -131,7 +138,8 @@ erDiagram
|
||||
|
||||
| Model | Primary key | Foreign keys | Important unique keys |
|
||||
|---|---|---|---|
|
||||
| `attendance_events` | `id` | `tenant_id -> tenants.id`, `assignment_id -> assignments.id` | `(assignment_id, source_event_id)` |
|
||||
| `clock_points` | `id` | `tenant_id -> tenants.id`, `business_id -> businesses.id` | `(tenant_id, nfc_tag_uid)` nullable |
|
||||
| `attendance_events` | `id` | `tenant_id -> tenants.id`, `assignment_id -> assignments.id`, `clock_point_id -> clock_points.id` | append-only event log |
|
||||
| `attendance_sessions` | `id` | `tenant_id -> tenants.id`, `assignment_id -> assignments.id` | one open session per assignment |
|
||||
| `timesheets` | `id` | `tenant_id -> tenants.id`, `assignment_id -> assignments.id`, `staff_id -> staffs.id` | `(assignment_id)` |
|
||||
| `timesheet_adjustments` | `id` | `timesheet_id -> timesheets.id`, `actor_user_id -> users.id` | - |
|
||||
@@ -144,6 +152,8 @@ erDiagram
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
BUSINESSES ||--o{ CLOCK_POINTS : defines
|
||||
CLOCK_POINTS ||--o{ ATTENDANCE_EVENTS : validates
|
||||
ASSIGNMENTS ||--o{ ATTENDANCE_EVENTS : emits
|
||||
ASSIGNMENTS ||--o{ ATTENDANCE_SESSIONS : opens
|
||||
ASSIGNMENTS ||--o{ TIMESHEETS : settles
|
||||
|
||||
Reference in New Issue
Block a user