schémas json : déplacement fichiers ; ajout champ 'type'
This commit is contained in:
parent
fe71484946
commit
2504650646
14
categories/category.schema.json
Normal file
14
categories/category.schema.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["category"]
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["name"]
|
||||
}
|
@ -2,6 +2,10 @@
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["equipment"]
|
||||
},
|
||||
"category" : {
|
||||
"type": "string"
|
||||
},
|
||||
|
43
mouvements/movement.schema.json
Normal file
43
mouvements/movement.schema.json
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["movement"]
|
||||
},
|
||||
"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"]
|
||||
}
|
Loading…
Reference in New Issue
Block a user