{ "$schema": "https://json-schema.org/draft/2019-09/hyper-schema", "$id": "https://raw.githubusercontent.com/farmOS/farmOS.js/main/core_schemata/log/activity.json", "title": "Activity log", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "const": "activity" }, "meta": { "type": "object" }, "attributes": { "description": "Entity attributes", "type": "object", "properties": { "name": { "type": "string", "title": "Name", "maxLength": 255, "description": "The name of the log. Leave this blank to automatically generate a name.", "default": "" }, "timestamp": { "type": "string", "title": "Timestamp", "format": "date-time", "description": "Timestamp of the event being logged." }, "status": { "type": "string", "title": "Status", "maxLength": 255, "description": "Indicates the status of the log.", "default": "pending" }, "data": { "type": "string", "title": "Data", "maxLength": 255 }, "flag": { "type": "array", "title": "Flags", "description": "Add flags to enable better sorting and filtering of records.", "items": { "type": "string", "title": "Text value" } }, "notes": { "type": "object", "properties": { "value": { "type": "string", "title": "Text" }, "format": { "type": "string", "title": "Text format" } }, "required": [ "value" ], "title": "Notes" }, "geometry": { "type": "object", "properties": { "value": { "type": "string", "title": "Geometry" }, "geo_type": { "type": "string", "title": "Geometry Type" }, "lat": {}, "lon": {}, "left": {}, "top": {}, "right": {}, "bottom": {}, "geohash": { "type": "string", "title": "Geohash" }, "latlon": { "type": "string", "title": "LatLong Pair" } }, "title": "Geometry", "description": "Add geometry data to this log to describe where it took place." }, "is_movement": { "type": "boolean", "title": "Is movement", "description": "If this log is a movement, then all assets referenced by it will be located in the referenced locations and/or geometry at the time the log takes place. The log must be complete in order for the movement to take effect." } }, "required": [ "status" ], "additionalProperties": false }, "relationships": { "description": "Entity relationships", "properties": { "asset": { "type": "array", "title": "Assets", "items": { "type": "object", "required": [ "id", "type" ], "properties": { "id": { "type": "string", "title": "Resource ID", "format": "uuid", "maxLength": 128 }, "type": { "type": "string" } } } }, "category": { "type": "array", "title": "Log category", "items": { "type": "object", "required": [ "id", "type" ], "properties": { "id": { "type": "string", "title": "Resource ID", "format": "uuid", "maxLength": 128 }, "type": { "type": "string" } } } }, "file": { "type": "array", "title": "Files", "items": { "type": "object", "required": [ "id", "type" ], "properties": { "id": { "type": "string", "title": "Resource ID", "format": "uuid", "maxLength": 128 }, "type": { "type": "string" } } } }, "image": { "type": "array", "title": "Images", "items": { "type": "object", "required": [ "id", "type" ], "properties": { "id": { "type": "string", "title": "Resource ID", "format": "uuid", "maxLength": 128 }, "type": { "type": "string" } } } }, "owner": { "type": "array", "title": "Assigned to", "items": { "type": "object", "required": [ "id", "type" ], "properties": { "id": { "type": "string", "title": "Resource ID", "format": "uuid", "maxLength": 128 }, "type": { "type": "string" } } } }, "quantity": { "type": "array", "title": "Quantity", "items": { "type": "object", "required": [ "id", "type" ], "properties": { "id": { "type": "string", "title": "Resource ID", "format": "uuid", "maxLength": 128 }, "type": { "type": "string" } } } }, "location": { "type": "array", "title": "Location", "items": { "type": "object", "required": [ "id", "type" ], "properties": { "id": { "type": "string", "title": "Resource ID", "format": "uuid", "maxLength": 128 }, "type": { "type": "string" } } } }, "equipment": { "type": "array", "title": "Equipment used", "items": { "type": "object", "required": [ "id", "type" ], "properties": { "id": { "type": "string", "title": "Resource ID", "format": "uuid", "maxLength": 128 }, "type": { "type": "string" } } } } }, "type": "object", "additionalProperties": false } } }