init: add contract definitions and database schema with migrations skeleton

This commit is contained in:
2026-04-04 22:42:16 +03:00
parent 1681a694d3
commit 879418b5a9
14 changed files with 251 additions and 8 deletions

View File

@@ -1,12 +1,31 @@
{
"type": "object",
"required": ["v", "id", "type", "ts", "deviceId", "payload"],
"required": ["v", "type", "ts", "deviceId", "payload"],
"properties": {
"v": { "type": "integer" },
"id": { "type": "string" },
"type": { "type": "string" },
"ts": { "type": "integer" },
"deviceId": { "type": "string" },
"payload": { "type": "object" }
"v": {
"type": "integer",
"description": "Protocol version"
},
"type": {
"type": "string",
"description": "Message type"
},
"ts": {
"type": "integer",
"description": "Unix time in milliseconds"
},
"deviceId": {
"type": "string",
"minLength": 1,
"description": "Unique device identifier"
},
"payload": {
"type": "object",
"description": "Message-specific data"
}
}
}