From fe7148494657f3a1f0a4f966eb7a8d0d0b54ba37 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Tue, 10 Oct 2023 16:16:03 +0200 Subject: [PATCH] =?UTF-8?q?Version=20initiale=20sch=C3=A9mas=20json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- category.schema.json | 10 +++++++++ equipment.schema.json | 14 +++++++++++++ mouvements/entrees/index.html | 6 ++++++ mouvements/sorties/index.html | 6 ++++++ movement.schema.json | 39 +++++++++++++++++++++++++++++++++++ 5 files changed, 75 insertions(+) create mode 100644 category.schema.json create mode 100644 equipment.schema.json create mode 100644 mouvements/entrees/index.html create mode 100644 mouvements/sorties/index.html create mode 100644 movement.schema.json diff --git a/category.schema.json b/category.schema.json new file mode 100644 index 0000000..2213d91 --- /dev/null +++ b/category.schema.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": ["name"] +} diff --git a/equipment.schema.json b/equipment.schema.json new file mode 100644 index 0000000..1f38c1e --- /dev/null +++ b/equipment.schema.json @@ -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"] +} diff --git a/mouvements/entrees/index.html b/mouvements/entrees/index.html new file mode 100644 index 0000000..cd4b10e --- /dev/null +++ b/mouvements/entrees/index.html @@ -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}} diff --git a/mouvements/sorties/index.html b/mouvements/sorties/index.html new file mode 100644 index 0000000..17e3fa2 --- /dev/null +++ b/mouvements/sorties/index.html @@ -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}} diff --git a/movement.schema.json b/movement.schema.json new file mode 100644 index 0000000..f4340c3 --- /dev/null +++ b/movement.schema.json @@ -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"] +}