| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- {
- "$schema": "https://json-schema.org/draft/2020-12/schema",
- "$id": "urn:aidop:mdp:MDP-PO-001:1.0.0",
- "title": "Purchase order secondary package",
- "type": "object",
- "required": ["packageCode", "packageVersion", "objectCode", "tenantId", "factoryId", "sourceCode", "datasetKey", "batchId", "sourceSchemaVersion", "mappingVersion", "items"],
- "properties": {
- "packageCode": { "const": "MDP-PO-001" },
- "packageVersion": { "const": "1.0.0" },
- "objectCode": { "const": "PURCHASE_ORDER" },
- "tenantId": { "type": "string", "pattern": "^[1-9][0-9]*$" },
- "factoryId": { "type": "string", "pattern": "^[1-9][0-9]*$" },
- "sourceCode": { "type": "string", "minLength": 1 },
- "datasetKey": { "const": "lab.erp.purchase-order.v1" },
- "batchId": { "type": "string", "minLength": 1 },
- "sourceSchemaVersion": { "const": "po-source-v1" },
- "mappingVersion": { "const": "po-map-v1" },
- "items": {
- "type": "array",
- "minItems": 1,
- "items": {
- "type": "object",
- "required": ["businessKey", "rawEventId", "poNo", "poLine", "itemCode", "orderQty", "sourceUpdatedAt"],
- "properties": {
- "businessKey": { "type": "string", "maxLength": 151, "pattern": "^[^#]+#[^#]+$" },
- "rawEventId": { "type": "string", "minLength": 1 },
- "poNo": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[^#]+$" },
- "poLine": { "type": "string", "minLength": 1, "maxLength": 50, "pattern": "^[^#]+$" },
- "itemCode": { "type": "string", "minLength": 1, "maxLength": 100 },
- "orderQty": { "type": "number", "exclusiveMinimum": 0, "exclusiveMaximum": 1000000000000, "multipleOf": 0.000001 },
- "supplierCode": { "type": ["string", "null"], "maxLength": 100 },
- "orderDate": { "$ref": "#/$defs/plantTime" },
- "dueDate": { "$ref": "#/$defs/plantTime" },
- "status": { "type": ["string", "null"], "maxLength": 50 },
- "sourceUpdatedAt": { "type": "string", "format": "date-time", "pattern": "(Z|[+-][0-9]{2}:[0-9]{2})$" }
- }
- }
- }
- },
- "$defs": {
- "plantTime": { "type": ["string", "null"], "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$" }
- }
- }
|