generated: '2026-09-26' method: derived generator: derive-data-model.py source: - openapi/assignar-openapi.yaml notation: has_one = property $ref; has_many = array of $ref; belongs_to = _id field summary: entities: 102 entities_in_spec: 102 relationships: 155 entities: - name: Activity fields: 17 - name: ActivityEntry fields: 15 - name: Allocation fields: 9 - name: AssetAttachment fields: 15 - name: AssetAttachmentSummary fields: 8 description: An asset attachment as it appears inside an asset's `attachments` array. These eight fields are exhaustive — the asset endpoints rebuild each entry from named keys, so the other columns on `/asset-att - name: AssetClass fields: 4 - name: AssetClassDetail fields: 0 description: An asset class as returned by the `/asset-classes` collection. Extends the `AssetClass` summary — the four fields the `assetClass` relation selects when embedded in an asset or a site diary entry — wi - name: AssetDocument fields: 17 description: A document definition attached to an asset, with the uploaded file. - name: AssetEntry fields: 15 - name: AssetWithTagId fields: 21 - name: AssetWithTagPart fields: 22 - name: ChargeCodeRequest fields: 3 - name: ChargeCodeResponse fields: 6 - name: ChargeItem fields: 4 - name: Client fields: 19 - name: ClientContactCreated fields: 4 description: A client/contact association as returned when created. - name: ClientContactsPayload fields: 3 - name: CodedTime fields: 24 - name: CodedTimesheet fields: 0 - name: CodedTimesheetWeeklyStatus fields: 10 - name: CodedWorkerTimes fields: 7 - name: Competency fields: 6 - name: Contact fields: 18 - name: CreateUpdateAssetAttachmentRequest fields: 12 - name: DigitalDocket fields: 15 - name: DigitalDockets fields: 14 - name: Document fields: 7 description: A document definition in the tenant's catalog. Attach one to an asset or a project by its `id`; the catalog itself is read-only. - name: EmploymentType fields: 2 - name: FormResult fields: 0 description: Full form result including `result_data`, as returned by `GET /form-results/{formResultId}`. - name: FormResultFields fields: 18 - name: FormResultListItem fields: 0 description: Same shape as a full form result except `result_data` is not included on list responses. Use the single-result endpoint for `result_data`. - name: FormResultTail fields: 7 - name: Induction fields: 4 - name: LeaveRequest fields: 24 - name: LeaveRequestEntry fields: 14 - name: LeaveType fields: 4 - name: Order fields: 26 - name: OrderActivity fields: 6 - name: OrderActivityCreate fields: 2 - name: OrderActivityUpdate fields: 2 - name: OrderAttachment fields: 7 - name: OrderContactCreated fields: 3 description: An order/contact association as returned when created. - name: OrderContactsPayload fields: 2 - name: OrderResource fields: 5 - name: OrderStatus fields: 2 - name: OrderTask fields: 6 - name: OrderTaskChargeItem fields: 6 - name: OrderTaskChargeItemCreated fields: 11 description: An order task charge item as returned when created. - name: OrderTaskCreated fields: 10 description: A single order task row as returned when created. One row is created for each shift date supplied in `dates`, so a create returns an array of these rather than a single object. - name: OrderTaskShiftDate fields: 2 - name: OrderTaskWithOrderAndTask fields: 10 - name: OrderTemplate fields: 13 - name: OrderTemplateActivity fields: 8 - name: OrderTemplateTag fields: 4 - name: OrderTemplateTask fields: 10 - name: OrderTemplateTaskForm fields: 5 - name: OrderType fields: 2 - name: PayCode fields: 10 - name: ProjectContactCreated fields: 3 description: A project/contact association as returned when created. - name: ProjectContactsPayload fields: 2 - name: ProjectCreateResponse fields: 18 - name: ProjectDocument fields: 18 - name: ProjectRequest fields: 15 - name: ProjectResponse fields: 26 - name: RelatedAssetEntry fields: 8 - name: SiteDiary fields: 23 - name: SiteDiaryChargeableItem fields: 4 - name: SiteDiaryTimesheet fields: 5 - name: Skill fields: 3 - name: SkillCreate fields: 0 description: The same body as an update, except that `name` is required. - name: SkillUpdate fields: 2 description: Every field is optional — send only what you want to change, and anything omitted is left as it is. A skill can be renamed without touching its sub-skill, and its sub-skill can be set or removed witho - name: Supplier fields: 20 - name: SupplierWithTagId fields: 20 - name: Tag fields: 6 - name: TagPart fields: 4 - name: Task fields: 12 - name: TaskGroup fields: 2 - name: TimeCode fields: 5 - name: TimeCodeGroup fields: 4 - name: TimeCodeGroupPayCode fields: 5 - name: TimeCodeGroupVersion fields: 4 - name: TimeCodeRule fields: 4 - name: Timesheet fields: 54 - name: TimesheetActivity fields: 5 - name: TimesheetChargeItem fields: 6 - name: TimesheetExpanded fields: 51 - name: TimesheetExpandedAllowance fields: 5 - name: TimesheetPayItem fields: 6 - name: TimesheetTime fields: 20 - name: TimesheetsExpandedList fields: 2 - name: UrlAttachment fields: 2 - name: User fields: 29 - name: UserCompetency fields: 10 - name: UserCompetencyUpdateCreate fields: 9 - name: UserCreateUpdate fields: 6 - name: UserInduction fields: 10 - name: UserInductionUpdateCreate fields: 9 - name: UserReference fields: 4 - name: UserSkill fields: 5 - name: UserSkillUpdateCreate fields: 4 - name: UserType fields: 5 - name: UserWithTagId fields: 29 relationships: - from: Allocation to: Timesheet type: belongs_to via: timesheet_id - from: Allocation to: OrderResource type: has_one via: resource - from: AssetWithTagId to: AssetClass type: belongs_to via: asset_class_id - from: AssetWithTagPart to: AssetClass type: belongs_to via: asset_class_id - from: AssetWithTagPart to: AssetClass type: has_one via: assetClass - from: AssetWithTagPart to: TagPart type: has_many via: tags - from: AssetWithTagPart to: AssetAttachmentSummary type: has_many via: attachments - from: Supplier to: TagPart type: has_many via: tags - from: ProjectResponse to: Client type: belongs_to via: client_id - from: ProjectCreateResponse to: Client type: belongs_to via: client_id - from: ProjectRequest to: Client type: belongs_to via: client_id - from: AssetDocument to: Document type: belongs_to via: document_id - from: AssetDocument to: UrlAttachment type: has_one via: attachment_url - from: Document to: UrlAttachment type: has_one via: attachment_url - from: Document to: TagPart type: has_many via: tags - from: ProjectDocument to: Document type: belongs_to via: document_id - from: ProjectDocument to: UrlAttachment type: has_one via: attachment_url - from: OrderAttachment to: Order type: belongs_to via: order_id - from: OrderAttachment to: UrlAttachment type: has_one via: attachment_url - from: Order to: Client type: belongs_to via: client_id - from: Order to: Supplier type: belongs_to via: supplier_id - from: Order to: OrderActivity type: has_many via: activities - from: OrderActivity to: Activity type: belongs_to via: activity_id - from: OrderTemplate to: OrderTemplateTask type: has_many via: tasks - from: OrderTemplate to: OrderTemplateActivity type: has_many via: activities - from: OrderTemplate to: OrderTemplateTag type: has_many via: tags - from: OrderTemplateTask to: Task type: belongs_to via: task_id - from: OrderTemplateTask to: OrderTemplateTaskForm type: has_many via: forms - from: OrderTemplateActivity to: Activity type: belongs_to via: activity_id - from: OrderTemplateTag to: Tag type: belongs_to via: tag_id - from: OrderTask to: Task type: belongs_to via: task_id - from: OrderTaskWithOrderAndTask to: Order type: belongs_to via: order_id - from: OrderTaskWithOrderAndTask to: Task type: belongs_to via: task_id - from: OrderResource to: User type: belongs_to via: user_id - from: OrderResource to: Order type: belongs_to via: order_id - from: OrderResource to: OrderTaskWithOrderAndTask type: has_one via: order_task - from: OrderTaskChargeItem to: ChargeItem type: belongs_to via: charge_item_id - from: OrderActivityCreate to: Activity type: belongs_to via: activity_id - from: OrderActivityUpdate to: OrderActivity type: belongs_to via: order_activity_id - from: PayCode to: TimeCode type: belongs_to via: time_code_id - from: TimeCodeRule to: TimeCode type: belongs_to via: time_code_id - from: TimeCodeGroupVersion to: TimeCodeGroup type: belongs_to via: time_code_group_id - from: TimeCodeGroupVersion to: TimeCodeGroup type: has_one via: time_code_group - from: TimeCodeGroupPayCode to: TimeCode type: belongs_to via: time_code_id - from: TimeCodeGroupPayCode to: PayCode type: belongs_to via: pay_code_id - from: TimeCodeGroupPayCode to: TimeCode type: has_one via: time_code - from: TimeCodeGroupPayCode to: PayCode type: has_one via: pay_code - from: Timesheet to: Client type: belongs_to via: client_id - from: Timesheet to: User type: belongs_to via: user_id - from: Timesheet to: Task type: belongs_to via: task_id - from: Timesheet to: Order type: belongs_to via: order_id - from: Timesheet to: Supplier type: belongs_to via: supplier_id - from: Timesheet to: UrlAttachment type: has_one via: client_signature_url - from: Timesheet to: UrlAttachment type: has_one via: signature_url - from: TimesheetsExpandedList to: TimesheetExpanded type: has_many via: rows - from: TimesheetExpanded to: Client type: belongs_to via: client_id - from: TimesheetExpanded to: User type: belongs_to via: user_id - from: TimesheetExpanded to: Task type: belongs_to via: task_id - from: TimesheetExpanded to: Order type: belongs_to via: order_id - from: TimesheetExpanded to: Supplier type: belongs_to via: supplier_id - from: TimesheetExpanded to: UrlAttachment type: has_one via: signature_url - from: TimesheetExpanded to: UrlAttachment type: has_one via: client_signature_url - from: TimesheetExpanded to: UrlAttachment type: has_one via: document_url - from: TimesheetExpanded to: ActivityEntry type: has_many via: activity_entries - from: TimesheetExpanded to: AssetEntry type: has_many via: asset_entries - from: TimesheetExpanded to: LeaveRequestEntry type: has_many via: leave_request_entries - from: TimesheetExpanded to: TimesheetExpandedAllowance type: has_many via: allowances - from: ActivityEntry to: UserReference type: has_one via: created_by - from: ActivityEntry to: UserReference type: has_one via: modified_by - from: ActivityEntry to: RelatedAssetEntry type: has_many via: related_asset_entries - from: RelatedAssetEntry to: AssetEntry type: belongs_to via: asset_entry_id - from: RelatedAssetEntry to: UserReference type: has_one via: created_by - from: RelatedAssetEntry to: UserReference type: has_one via: modified_by - from: AssetEntry to: UserReference type: has_one via: created_by - from: AssetEntry to: UserReference type: has_one via: modified_by - from: LeaveRequestEntry to: UserReference type: has_one via: created_by - from: LeaveRequestEntry to: UserReference type: has_one via: modified_by - from: TimesheetExpandedAllowance to: Timesheet type: belongs_to via: timesheet_id - from: UserReference to: User type: belongs_to via: user_id - from: AssetClassDetail to: UserReference type: has_one via: createdBy - from: AssetClassDetail to: UserReference type: has_one via: modifiedBy - from: TimesheetActivity to: Timesheet type: belongs_to via: timesheet_id - from: TimesheetActivity to: Activity type: belongs_to via: activity_id - from: TimesheetChargeItem to: Timesheet type: belongs_to via: timesheet_id - from: TimesheetPayItem to: Timesheet type: belongs_to via: timesheet_id - from: CodedTime to: Timesheet type: belongs_to via: timesheet_id - from: CodedTime to: TimesheetTime type: belongs_to via: timesheet_time_id - from: CodedTime to: User type: belongs_to via: user_id - from: CodedTime to: TimeCodeGroupPayCode type: belongs_to via: time_code_group_pay_code_id - from: CodedTime to: TimeCodeGroupVersion type: belongs_to via: time_code_group_version_id - from: CodedTime to: TimeCodeRule type: belongs_to via: time_code_rule_id - from: CodedTime to: TimeCodeGroupPayCode type: has_one via: default_pay_code - from: CodedTime to: TimeCodeRule type: has_one via: time_code_rule - from: CodedTime to: UserCreateUpdate type: has_one via: created_by - from: CodedTime to: UserCreateUpdate type: has_one via: coded_by - from: CodedTime to: UserCreateUpdate type: has_one via: overriden_by - from: CodedTime to: TimeCodeGroupVersion type: has_one via: time_code_group_version - from: TimesheetTime to: Timesheet type: belongs_to via: timesheet_id - from: TimesheetTime to: Activity type: belongs_to via: activity_id - from: TimesheetTime to: CodedTime type: has_many via: coded_times - from: CodedTimesheet to: TimesheetTime type: has_many via: timesheet_times - from: CodedWorkerTimes to: User type: belongs_to via: user_id - from: CodedWorkerTimes to: CodedTimesheet type: has_many via: timesheets - from: User to: UserType type: belongs_to via: user_type_id - from: User to: TagPart type: has_many via: tags - from: UserCreateUpdate to: User type: belongs_to via: user_id - from: UserWithTagId to: UserType type: belongs_to via: user_type_id - from: UserSkill to: User type: belongs_to via: user_id - from: UserSkill to: Skill type: belongs_to via: skill_id - from: UserSkillUpdateCreate to: User type: belongs_to via: user_id - from: UserSkillUpdateCreate to: Skill type: belongs_to via: skill_id - from: UserCompetency to: User type: belongs_to via: user_id - from: UserCompetency to: Competency type: belongs_to via: competency_id - from: UserCompetencyUpdateCreate to: User type: belongs_to via: user_id - from: UserCompetencyUpdateCreate to: Competency type: belongs_to via: competency_id - from: UserInduction to: User type: belongs_to via: user_id - from: UserInduction to: Induction type: belongs_to via: induction_id - from: UserInductionUpdateCreate to: User type: belongs_to via: user_id - from: UserInductionUpdateCreate to: Induction type: belongs_to via: induction_id - from: DigitalDocket to: Client type: belongs_to via: client_id - from: DigitalDocket to: Order type: belongs_to via: order_id - from: DigitalDockets to: Client type: belongs_to via: client_id - from: DigitalDockets to: Order type: belongs_to via: order_id - from: ClientContactCreated to: Client type: belongs_to via: client_id - from: ClientContactCreated to: Contact type: belongs_to via: contact_id - from: OrderContactCreated to: Order type: belongs_to via: order_id - from: OrderContactCreated to: Contact type: belongs_to via: contact_id - from: ProjectContactCreated to: Contact type: belongs_to via: contact_id - from: OrderTaskCreated to: Order type: belongs_to via: order_id - from: OrderTaskCreated to: Task type: belongs_to via: task_id - from: OrderTaskCreated to: OrderTask type: belongs_to via: order_task_id - from: OrderTaskChargeItemCreated to: Order type: belongs_to via: order_id - from: OrderTaskChargeItemCreated to: OrderTask type: belongs_to via: order_task_id - from: OrderTaskChargeItemCreated to: ChargeItem type: belongs_to via: charge_item_id - from: FormResultFields to: Client type: belongs_to via: client_id - from: FormResultFields to: Supplier type: belongs_to via: supplier_id - from: FormResultFields to: Order type: belongs_to via: order_id - from: FormResultFields to: OrderResource type: belongs_to via: order_resource_id - from: ClientContactsPayload to: Client type: belongs_to via: client_id - from: ClientContactsPayload to: Contact type: belongs_to via: contact_id - from: ProjectContactsPayload to: Contact type: belongs_to via: contact_id - from: OrderContactsPayload to: Order type: belongs_to via: order_id - from: OrderContactsPayload to: Contact type: belongs_to via: contact_id - from: SiteDiary to: Client type: belongs_to via: client_id - from: SiteDiary to: Order type: belongs_to via: order_id - from: SiteDiary to: UrlAttachment type: has_one via: client_signature_url - from: SiteDiary to: UrlAttachment type: has_one via: supervisor_signature_url - from: SiteDiary to: UrlAttachment type: has_one via: print_document - from: SiteDiaryChargeableItem to: SiteDiary type: belongs_to via: site_diary_id - from: SiteDiaryTimesheet to: SiteDiary type: belongs_to via: site_diary_id - from: SiteDiaryTimesheet to: Timesheet type: belongs_to via: timesheet_id - from: TagPart to: Tag type: belongs_to via: tag_id - from: LeaveRequest to: User type: belongs_to via: user_id - from: LeaveRequest to: LeaveType type: belongs_to via: leave_type_id - from: LeaveRequest to: UrlAttachment type: has_one via: attachment_url