apxtrib/adminapi/www/adminapx/schema/towns.json
2023-05-16 10:31:27 +02:00

46 lines
1.3 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "socialworld/objects/schema/towns",
"title": "Town",
"description": "A town belonging to a nation from apXtrib world",
"type": "object",
"properties": {
"townId": {
"description": "|Towns|townnamedesc",
"desclong": "|Townss|townnamedesclong",
"info": "|Towns|townnameinfo",
"type": "string",
"pattern":"^[a-z0-9]*$"
},
"nationId": {
"description": "|Towns|nationdesc",
"desclong": "|Townss|nationdesclong",
"type": "string",
"$apxenumkey": "socialworld/objects/nations/searchindex/nations_uuid_uuid.json"
},
"status": {
"desc": "|Towns|statusdesc",
"default": "active",
"type": "string",
"$apxenumkey": "data",
"data": {
"chain": { "desc": "|Towns|statuschain" },
"tochain": { "desc": "|Towns|statustosync" },
"unchain": { "desc": "|Towns|statusunchain" }
}
},
"url": {
"desc": "|Towns|urldesc",
"type": "string",
"apxtype":"url"
}
},
"required": ["townId", "status", "nationId", "url"],
"apxprimarykey": "townId",
"apxsearchindex": [
{ "key": "status", "value": "townId" },
{ "key": "nationId", "value": "townId" },
{ "key": "townId", "value": [] }
]
}