apxtrib/nationchains/schema/person.json

48 lines
1.6 KiB
JSON
Raw Normal View History

2023-04-27 04:17:20 +00:00
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "nationchains/schema/person",
"title": "Person minimum definition to link a person to a pagan identity",
"description": "A person is a human with a apxtrib identity (Public Private Key. Information stored (not cipher) for a person are only visible from the town's Mayor and the tribe's Druid. You need at least trus the druid that trust the mayor (for sensitive data Mayor and Druid can be the same apx Identity.) Only a pagan that have the privateKey can read cipher data.",
"type": "objects",
"properties": {
"alias": {
"type": "string",
"minLength": 5,
"pattern": "^[a-z0-9]*$"
},
"dt_create": {
"type": "string",
"format": "datetime",
"default": "dayjs.now()"
},
"dt_update": { "type": "string", "format": "datetime" },
"dt_lastlogin": { "type": "string", "format": "datetime" },
"dt_close": { "type": "string", "format": "datetime" },
"recovery": {
"type": "object",
"$ref": {
"email": { "type": "string", "format": "email" },
"privatekey": { "type": "string", "format": "eccCorve25519armored" }
}
},
"biography": {
"type": "string",
"pattern": "^.{O,150}$"
},
"imgavatar": {
"type": "string",
},
"accessrights": {
"type": "object",
"$ref": "nationchains/schema/accessright.json"
}
},
"required": ["alias", "accessright"],
"apxprimarykey": "alias",
"apxunique": [""],
"apxsearchindex": [
{ "key": "alias", "value": [] },
{ "key": "recovery.email", "value": "alias" }
]
}