{
  "$id": "https://schema.nfh.global/Constraint/v2.0",
  "x-iri": "https://schema.nfh.global/Constraint/v2.0",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Schema definition for Constraint in the Beckn Protocol v2.0.1",
  "title": "Constraint",
  "type": "object",
  "properties": {
    "constraintType": {
      "description": "Type of constraint (extensible term)",
      "type": "string"
    },
    "id": {
      "description": "Identifier for the constraint",
      "type": "string"
    },
    "operator": {
      "description": "Comparator/operator (<=, >=, =, etc.)",
      "type": "string"
    },
    "unitCode": {
      "description": "Unit code (e.g., km, min)",
      "type": "string"
    },
    "validity": {
      "$ref": "https://schema.nfh.global/TimePeriod/v2.1/schema.json"
    },
    "value": {
      "description": "Constraint value",
      "type": "number"
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": false,
  "x-tags": [
    "common"
  ]
}
