{
"id": "060776ef-2eff-4f76-82ba-9b40cfad1c6c",
"tenantId": "pb",
"code": "ws-services-calculation.WCBillingSlab",
"description": "ws-services-calculation WCBillingSlab",
"definition": {
"type": "object",
"allOf": [
{
"if": {
"required": ["connectionType"],
"properties": {
"connectionType": {"const": "Metered"}
}
},
"then": {
"required": ["slabs"],
"properties": {
"calculationAttribute": {"enum": ["Water consumption"]}
}
}
},
{
"if": {
"required": ["connectionType"],
"properties": {
"connectionType": {"const": "Non_Metered"}
}
},
"then": {
"properties": {
"calculationAttribute": {
"enum": ["Flat", "No. of taps", "Pipe Size"]
}
}
}
}
],
"title": "Generated schema for Root",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": ["buildingType", "calculationAttribute", "connectionType", "minimumCharge"],
"x-unique": ["buildingType", "connectionType"],
"properties": {
"slabs": {
"type": "array",
"items": {
"type": "object",
"required": ["from", "to", "charge"],
"properties": {
"to": {"type": "number"},
"from": {"type": "number"},
"charge": {"type": "number"},
"meterCharge": {"type": "number"}
}
}
},
"buildingType": {
"enum": [
"RESIDENTIAL", "NONRESIDENTIAL", "COMMERCIAL AND GOVERNMENT",
"PARTLY COMMERCIAL", "COMMERCIAL", "GOVERNMENT", "MIXED", "PUBLICSECTOR"
],
"type": "string"
},
"minimumCharge": {"type": "number"},
"connectionType": {
"enum": ["Metered", "Non_Metered"],
"type": "string"
},
"calculationAttribute": {
"enum": ["Flat", "Water consumption", "No. of taps", "Pipe Size"],
"type": "string"
}
}
},
"isActive": true,
"auditDetails": {
"createdBy": "3059806b-3059-4724-8ae1-d3f4e12686ff",
"lastModifiedBy": "3059806b-3059-4724-8ae1-d3f4e12686ff",
"createdTime": 1701151086754,
"lastModifiedTime": 1701151086754
}
}