{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Pricing Policy Bulk Upload",
  "description": "Schema for bulk upload of pricing policy declarations",
  "type": "array",
  "items": {
    "type": "object",
    "required": [
      "ship_type",
      "port_from_code",
      "port_to_code",
      "fare_type",
      "net_fare",
      "date_from",
      "date_to"
    ],
    "properties": {
      "ship_call_sign": {
        "type": "string",
        "description": "Ship call sign (DDS) - optional, can be combined with ship_type",
        "examples": ["SY1234", "P5678"]
      },
      "ship_type": {
        "type": "string",
        "enum": ["CONVENTIONAL", "HIGH_SPEED"],
        "description": "Ship type - required for all records"
      },
      "subsidized": {
        "type": "boolean",
        "description": "Whether the fare applies to subsidized routes (optional, defaults to false)",
        "default": false
      },
      "port_from_code": {
        "type": "string",
        "description": "Departure port code",
        "examples": ["PIR", "AEG", "MYK"]
      },
      "port_to_code": {
        "type": "string",
        "description": "Arrival port code",
        "examples": ["PIR", "AEG", "MYK"]
      },
      "fare_type": {
        "type": "string",
        "enum": ["ECON", "CAR", "TRUCK"],
        "description": "Fare type code"
      },
      "gross_fare": {
        "type": "number",
        "minimum": 0,
        "description": "Gross fare in EUR (required except for TRUCK fare type)"
      },
      "net_fare": {
        "type": "number",
        "minimum": 0,
        "description": "Net fare in EUR (required)"
      },
      "date_from": {
        "type": "string",
        "format": "date",
        "description": "Validity start date (YYYY-MM-DD)"
      },
      "date_to": {
        "type": "string",
        "format": "date",
        "description": "Validity end date (YYYY-MM-DD)"
      }
    }
  },
  "minItems": 1
}
