{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "baseRateSet.schema.json",
    "title": "baseRateSet",
    "type": "object",
    "description": "Набор базовых ставок",
    "properties": {
        "startDate": {
            "type": "string",
            "format": "date",
            "description": "Дата начала"
        },
        "endDate": {
            "type": "string",
            "format": "date",
            "description": "Дата окончания"
        },
        "agent": {
            "$ref": "agent.schema.json"
        },
        "status": {
            "enum": [
                "ACTIVE",
                "FINISHED",
                "PLANNED"
            ],
            "description": "Статус. ACTIVE - Активен, FINISHED - Завершён, PLANNED - Запланирован"
        },
        "rates": {
            "type": "array",
            "item": {
                "type": "object",
                "properties": {
                    "currencyCustomer": {
                        "description": "Валюта отправителя",
                        "$ref": "common/_common.schema.json#/currency"
                    },
                    "currency": {
                        "description": "Валюта получателя",
                        "$ref": "common/_common.schema.json#/currency"
                    },
                    "country": {
                        "description": "Страна банка получателя",
                        "$ref": "common/_common.schema.json#/country"
                    },
                    "minAmount": {
                        "type": "number",
                        "minimum": 0.01,
                        "maximum": 99999999999.99,
                        "multipleOf": 0.01,
                        "description": "Нижняя граница диапазона"
                    },
                    "maxAmount": {
                        "type": "number",
                        "minimum": 0.01,
                        "maximum": 99999999999.99,
                        "multipleOf": 0.01,
                        "description": "Верхняя граница диапазона"
                    },
                    "percent": {
                        "type": "number",
                        "minimum": 0.00,
                        "multipleOf": 0.0001,
                        "maximum": 99999999999.9999,
                        "description": "Размер ставки, указывается в %"
                    },
                    "minimumRateThreshold": {
                        "type": "number",
                        "minimum": 0.00,
                        "multipleOf": 0.01,
                        "maximum": 99999999999.9999,
                        "description": "Не менее указанной суммы"
                    }
                }
            }
        }
    }
}