diff --git a/services/ontology/schemas/property-expense.json b/services/ontology/schemas/property-expense.json new file mode 100644 index 000000000..a4dd7862b --- /dev/null +++ b/services/ontology/schemas/property-expense.json @@ -0,0 +1,85 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "schemaId": "967604a6-66bd-426b-8e96-7d3e8be3b824", + "title": "PropertyExpense", + "domain": "property", + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "The stable identifier for the property expense record." + }, + "propertyId": { + "type": "string", + "format": "uuid", + "description": "The identifier of the Property record this expense belongs to." + }, + "ownerEname": { + "type": "string", + "description": "The W3DS eName of the person or group that owns this expense record." + }, + "category": { + "type": "string", + "description": "The operational category of the expense, such as maintenance, utilities, or insurance." + }, + "description": { + "type": "string", + "description": "A concise explanation of the property expense." + }, + "supplier": { + "type": "string", + "description": "The supplier or payee associated with the expense when known." + }, + "amountMinor": { + "type": "integer", + "minimum": 1, + "description": "The expense amount in the smallest unit of its currency." + }, + "currencyCode": { + "type": "string", + "pattern": "^[A-Z]{3}$", + "description": "The ISO 4217 currency code for the expense amount." + }, + "recordKind": { + "type": "string", + "enum": ["plan", "fact", "forecast"], + "description": "Whether the record is a plan, an actual expense, or a forecast." + }, + "status": { + "type": "string", + "enum": ["draft", "posted", "void"], + "description": "The operating status of the expense record." + }, + "entryDate": { + "type": "string", + "format": "date", + "description": "The local business date the expense is recorded against." + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "When the expense record was created." + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "description": "When the expense record was last changed." + } + }, + "required": [ + "id", + "propertyId", + "ownerEname", + "category", + "description", + "amountMinor", + "currencyCode", + "recordKind", + "status", + "entryDate", + "createdAt", + "updatedAt" + ], + "additionalProperties": false +} diff --git a/services/ontology/schemas/property.json b/services/ontology/schemas/property.json new file mode 100644 index 000000000..794e6d355 --- /dev/null +++ b/services/ontology/schemas/property.json @@ -0,0 +1,60 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "schemaId": "69e1d7f3-327f-4c2e-811a-293861af8fe0", + "title": "Property", + "domain": "property", + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "The stable identifier for the property record." + }, + "ownerEname": { + "type": "string", + "description": "The W3DS eName of the person or group that owns this property record." + }, + "name": { + "type": "string", + "description": "A human-readable name for the property." + }, + "location": { + "type": "string", + "description": "The location label for the property, which may be less specific than its postal address." + }, + "timezone": { + "type": "string", + "description": "The IANA time zone used for the property’s operational dates." + }, + "currencyCode": { + "type": "string", + "pattern": "^[A-Z]{3}$", + "description": "The ISO 4217 currency code used for the property’s operating records." + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "When the property record was created." + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "description": "When the property record was last changed." + }, + "isArchived": { + "type": "boolean", + "description": "Whether the property has been archived from active operations." + } + }, + "required": [ + "id", + "ownerEname", + "name", + "location", + "timezone", + "currencyCode", + "createdAt", + "updatedAt" + ], + "additionalProperties": false +}