88 lines
1.9 KiB
JSON
88 lines
1.9 KiB
JSON
|
{
|
||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
|
"$id": "schema/towns",
|
||
|
"title": "Town",
|
||
|
"description": "A town belonging to a nation from apxtri world",
|
||
|
"type": "object",
|
||
|
"properties": {
|
||
|
"townId": {
|
||
|
"type": "string",
|
||
|
"pattern": "^[a-z0-9]*$"
|
||
|
},
|
||
|
"nationId": {
|
||
|
"type": "string",
|
||
|
"options": {
|
||
|
"$ref": "adminapi/objects/nations/idx/lst_nations.json"
|
||
|
}
|
||
|
},
|
||
|
"owner": {
|
||
|
"type": "string",
|
||
|
"options": {
|
||
|
"$ref": "adminapi/objects/pagans/idx/lst_alias.json"
|
||
|
}
|
||
|
},
|
||
|
"mayorId": {
|
||
|
"comment": "todo, to be remove by ower in models",
|
||
|
"type": "string",
|
||
|
"options": {
|
||
|
"$ref": "adminapi/objects/pagans/idx/lst_alias.json"
|
||
|
}
|
||
|
},
|
||
|
"IP": {
|
||
|
"comment": "IP adress where the dns answer to access in direct to this IP into a /etc/hosts or private dns",
|
||
|
"type": "string"
|
||
|
},
|
||
|
"status": {
|
||
|
"title": "The current status of this town",
|
||
|
"description": "Unchain is used for dev they are no public domain, chain means that a public domain name is available, elected means the consensus make this town as the master of adminapi data. A town is elected for a period of time necessary to get new election",
|
||
|
"default": "unchain",
|
||
|
"type": "string",
|
||
|
"enum": [
|
||
|
"unchain",
|
||
|
"chain",
|
||
|
"elected"
|
||
|
]
|
||
|
},
|
||
|
"dns": {
|
||
|
"type": "string"
|
||
|
}
|
||
|
},
|
||
|
"required": [
|
||
|
"townId",
|
||
|
"status",
|
||
|
"nationId",
|
||
|
"dns"
|
||
|
],
|
||
|
"apxid": "townId",
|
||
|
"apxuniquekey": [
|
||
|
"townId",
|
||
|
"dns"
|
||
|
],
|
||
|
"apxidx": [
|
||
|
{
|
||
|
"name": "lst_townId",
|
||
|
"type":"array",
|
||
|
"keyval": "townId"
|
||
|
},
|
||
|
{
|
||
|
"name": "towns",
|
||
|
"keyval": "townId",
|
||
|
"type": "view",
|
||
|
"objkey": [],
|
||
|
"filter": ""
|
||
|
}
|
||
|
],
|
||
|
"apxaccessrights": {
|
||
|
"pagan": {
|
||
|
"C": [],
|
||
|
"R": []
|
||
|
},
|
||
|
"owner": {
|
||
|
"D": [],
|
||
|
"U": [
|
||
|
"owner",
|
||
|
"status"
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
}
|