Version initiale schémas json

This commit is contained in:
Jean-Christophe Engel 2023-10-10 16:16:03 +02:00
parent ef004dcffb
commit fe71484946
5 changed files with 75 additions and 0 deletions

10
category.schema.json Normal file
View File

@ -0,0 +1,10 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": ["name"]
}

14
equipment.schema.json Normal file
View File

@ -0,0 +1,14 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"category" : {
"type": "string"
},
"designation": {
"description": "Désignation du matériel",
"type": "string"
}
},
"required": ["category", "designation"]
}

View File

@ -0,0 +1,6 @@
{{:admin_header title="Gestion des matériels" current="module_equipment"}}
{{* barre de navigation *}}
{{:include file="/%s/_nav.html"|args:$module.name current="entrees"}}
{{:admin_footer}}

View File

@ -0,0 +1,6 @@
{{:admin_header title="Gestion des matériels" current="module_equipment"}}
{{* barre de navigation *}}
{{:include file="/%s/_nav.html"|args:$module.name current="sorties"}}
{{:admin_footer}}

39
movement.schema.json Normal file
View File

@ -0,0 +1,39 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"direction" : {
"description": "Entrée ou sortie",
"type": "string",
"enum": ["entrée", "sortie"]
},
"inputNature": {
"description": "Nature de l'entrée",
"type": "string",
"enum": ["Achat", "Don", "Récupération", "Location / Prêt"]
},
"outputNature": {
"description": "Nature de la sortie",
"type": "string",
"enum": ["Vente", "Don", "Besoin", "Autre (perte, vol, ...)", "Location / Prêt"]
},
"amount": {
"description": "Quantité ajoutée ou retirée",
"type": "integer",
"minimum": 1
}
"equipment": {
"type": "string"
}
"date" : {
"description": "Date de l'opération",
"type": "string",
"format": "datetime"
}
"comment": {
"description": "Commentaire additionnel",
"type": "string"
}
},
"required": ["direction", "inputNature", "outputNature", "amount", "equipment", "date", "comment"]
}