Files
sync-protocol/schema/operation.schema.json
T

44 lines
1.4 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://sadtech.ir/schemas/operation.schema.json",
"title": "Operation",
"description": "An operation is a single action performed on the database.",
"type": "object",
"properties": {
"id": {
"description": "The unique identifier of the operation.",
"type": "string"
},
"type": {
"description": "The type of the operation.",
"type": "string",
"enum": [
"insert",
"update",
"delete"
]
},
"device_id": {
"description": "The unique identifier of the device that performed the operation.",
"type": "string"
},
"timestamp": {
"description": "The timestamp of the operation.",
"type": "string",
"format": "float"
},
"payload": {
"description": "The payload of the operation.",
"type": "object"
},
"entity_type": {
"description": "The type of the entity that the operation is performed on.",
"type": "string"
},
"entity_id": {
"description": "The unique identifier of the entity that the operation is performed on.",
"type": "string"
}
}
}