Skip to content

Data Definition Document: Operations Personnel

Domain: Operations (maintenance, security, personnel, services) Logical Sub-Domain: Personnel (Staff & Shifts) Physical Packages: @sd/mod-operations/personnel Related Documents: Process Blueprint Context: This document defines the Data Structures for HR and Scheduling. Source: packages/modules/operations/src/personnel/schema.ts

0. Entity Relationship Diagram (ERD)

erDiagram
    DIRECTORY_PROFILE ||--|| PERSONNEL_PROFILE : "is"
    PERSONNEL_PROFILE ||--o{ SHIFT : "assigned"
    PERSONNEL_PROFILE ||--o{ TIMECARD : "logs"

    PERSONNEL_PROFILE {
        string id PK
        string identityId FK
        enum type "employee, contractor"
        string employerId FK
    }

    SHIFT {
        string id PK
        date start
        date end
        string location
    }

    TIMECARD {
        string id PK
        date clockIn
        date clockOut
        float totalHours
    }

1. Primary Entities

Entity: PersonnelProfile

The professional context of a user.

Field Type Required Description
id string Yes Unique ID.
identityId string Yes Link to User Directory.
type string Yes employee, contractor, concessionaire.
employerId string Yes Organization ID (HOA or Vendor).
department string Yes Security, Maintenance.
jobTitle string Yes Manager, Guard.
status string Yes active, terminated.

Entity: Shift

A planned unit of work.

Field Type Required Description
personnelId string Yes The Worker.
scheduledStart Timestamp Yes Plan Start.
scheduledEnd Timestamp Yes Plan End.
location string No Duty Station.
isCovered boolean Yes Assignment status.

Entity: TimecardEntry

An actual unit of work.

Field Type Required Description
clockIn Timestamp Yes Actual Start.
clockOut Timestamp No Actual End.
breaks object[] Yes List of pause intervals.
totalHours number Yes Computed net duration.

4. Changelog

Date Author Description Reference
2026-01-24 Antigravity Initial creation Implementation Plan