Domain Model
Work Order Material
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 |
| workOrderId | string | Yes | — | ID of the associated work order |
| productId | unknown | Yes | — | ID of the associated product |
| description | string | Yes | — | Description |
| quantity | number | Yes | — | Quantity |
| unitCost | number | Yes | — | Unit cost |
| totalCost | number | Yes | — | Total cost |
| addedByUserId | string.uuid | Yes | — | ID of the associated added by user |
| workspaceId | string | Yes | — | ID of the associated workspace |
Create Schema
Fields accepted when creating a new record:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| workOrderId | string | Yes | — | ID of the associated work order |
| productId | string.uuid | No | — | ID of the associated product |
| description | string | Yes | — | Description |
| quantity | number | Yes | — | Quantity |
| unitCost | number | Yes | — | Unit cost |
| sourcePoLineItemId | unknown | No | — | ID of the associated source po line item |
| workspaceId | string | No | — | ID of the associated workspace |
Update Schema
All fields are optional when updating:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| productId | string.uuid | No | — | ID of the associated product |
| description | string | No | — | Description |
| quantity | number | No | — | Quantity |
| unitCost | number | No | — | Unit cost |
| sourcePoLineItemId | unknown | No | — | ID of the associated source po line item |