36 lines
1.1 KiB
JSON
36 lines
1.1 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"description": "Schéma des liens entre documents",
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["amort_link", "immo_link"]
|
|
},
|
|
"immo_doc_id" : {
|
|
"description": "identifiant du document d'immobilisation associé",
|
|
"type" : "integer",
|
|
"exclusiveMinimum": 0
|
|
},
|
|
"amort_line_id" : {
|
|
"description": "numéro de ligne d'amortissement associée à l'immobilisation",
|
|
"type": "integer",
|
|
"exclusiveMinimum": 0
|
|
},
|
|
"credit_line_id": {
|
|
"description": "numéro de ligne au crédit du compte de l'immobilisation",
|
|
"type": "integer",
|
|
"exclusiveMinimum": 0
|
|
},
|
|
"amount": {
|
|
"description": "montant de la ligne d'amortissement ou de crédit",
|
|
"type": ["number", "null"]
|
|
}
|
|
},
|
|
"required": ["type", "immo_doc_id"],
|
|
"if": {"properties": {"type": {"const": "amort_link"}}, "required": ["type"]},
|
|
"then": {"required": ["amort_line_id"]},
|
|
"else":
|
|
"if": {"properties": {"type": {"const": "immo_link"}}, "required": ["type"]},
|
|
"then": {"required": ["credit_line_id"]},
|
|
}
|