Domain Model
Invoice Line Item
Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string.uuid | Yes | — | Id |
| createdAt | string.date-time | Yes | — | Created at |
| updatedAt | string.date-time | Yes | — | Updated at |
| invoiceId | string | Yes | — | ID of the associated invoice |
| lineType | enum(labor, materials, service, equipment, permit, travel, discount, monitoring, milestone, other) | Yes | — | Line type |
| description | string | Yes | — | Description |
| quantity | number | Yes | — | Quantity |
| unitPrice | number | Yes | — | Unit price |
| totalPrice | unknown | No | — | Total price |
| sortOrder | integer | Yes | — | Sort order |
| workspaceId | string | Yes | — | ID of the associated workspace |
| visibilityMode | enum(global, workspace_local, shared) | Yes | — | Visibility mode |
Create Schema
Fields accepted when creating a new record:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| invoiceId | string | Yes | — | ID of the associated invoice |
| lineType | enum(labor, materials, service, equipment, permit, travel, discount, monitoring, milestone, other) | Yes | — | Line type |
| description | string | Yes | — | Description |
| quantity | number | Yes | — | Quantity |
| unitPrice | number | Yes | — | Unit price |
| totalPrice | unknown | No | — | Total price |
| sortOrder | integer | Yes | 0 | Sort order |
| workspaceId | string | No | — | ID of the associated workspace |
| visibilityMode | enum(global, workspace_local, shared) | Yes | "workspace_local" | Visibility mode |
Update Schema
All fields are optional when updating:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| lineType | enum(labor, materials, service, equipment, permit, travel, discount, monitoring, milestone, other) | No | — | Line type |
| description | string | No | — | Description |
| quantity | number | No | — | Quantity |
| unitPrice | number | No | — | Unit price |
| totalPrice | unknown | No | — | Total price |
| sortOrder | integer | No | 0 | Sort order |