Domain Model
Purchase Order 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 |
| purchaseOrderId | string | Yes | — | ID of the associated purchase order |
| description | string | Yes | — | Description |
| quantity | number | Yes | — | Quantity |
| unitCost | number | Yes | — | Unit cost |
| status | enum(pending, ordered, shipped, received, backordered, canceled) | Yes | — | Status |
| receivedQuantity | number | Yes | — | Received quantity |
| sortOrder | integer | Yes | — | Sort order |
| visibilityMode | enum(global, workspace_local, shared) | Yes | — | Visibility mode |
| bomLineId | string | No | — | ID of the associated bom line |
| partNumber | string | No | — | Part number |
| manufacturer | string | No | — | Manufacturer |
| totalCost | unknown | No | — | Total cost |
| workspaceId | string | Yes | — | ID of the associated workspace |
Create Schema
Fields accepted when creating a new record:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| purchaseOrderId | string | Yes | — | ID of the associated purchase order |
| description | string | Yes | — | Description |
| quantity | number | Yes | — | Quantity |
| unitCost | number | Yes | — | Unit cost |
| status | enum(pending, ordered, shipped, received, backordered, canceled) | Yes | "pending" | Status |
| receivedQuantity | number | Yes | 0 | Received quantity |
| sortOrder | integer | Yes | 0 | Sort order |
| visibilityMode | enum(global, workspace_local, shared) | Yes | "workspace_local" | Visibility mode |
| bomLineId | string | No | — | ID of the associated bom line |
| partNumber | string | No | — | Part number |
| manufacturer | string | No | — | Manufacturer |
| totalCost | unknown | No | — | Total cost |
| workspaceId | string | No | — | ID of the associated workspace |
Update Schema
All fields are optional when updating:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| description | string | No | — | Description |
| quantity | number | No | — | Quantity |
| unitCost | number | No | — | Unit cost |
| status | enum(pending, ordered, shipped, received, backordered, canceled) | No | "pending" | Status |
| receivedQuantity | number | No | 0 | Received quantity |
| sortOrder | integer | No | 0 | Sort order |
| bomLineId | string | No | — | ID of the associated bom line |
| partNumber | string | No | — | Part number |
| manufacturer | string | No | — | Manufacturer |
| totalCost | unknown | No | — | Total cost |