{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Debt",
    "type": "object",
    "properties": {
        "id": { "type": "string", "format": "uuid" },
        "companyId": { "type": "string", "format": "uuid" },
        "clientId": { "type": "string", "format": "uuid" },
        "debtScheduleId": { "type": "string", "format": "uuid" },
        "debtCode": { "type": "string" },
        "description": { "type": "string" },
        "totalAmount": { "type": "string" },
        "currency": { "type": "string", "enum": ["ARS", "USD"] },
        "dueDate": { "type": "string", "format": "date-time" },
        "issueDate": { "type": "string", "format": "date-time" },
        "dailyInterestRate": { "type": "string" },
        "status": { "type": "string", "enum": ["PENDING", "OVERDUE", "PARTIALLY_PAID", "PAID", "CANCELLED"] },
        "notes": { "type": "string" },
        "extraData": { "type": "object" },
        "invoiceTemplateId": { "type": "string", "format": "uuid" },
        "createdAt": { "type": "string", "format": "date-time" },
        "createdBy": { "type": "string", "format": "uuid" },
        "updatedAt": { "type": "string", "format": "date-time" },
        "updatedBy": { "type": "string", "format": "uuid" },
        "deletedAt": { "type": "string", "format": "date-time" },
        "deletedBy": { "type": "string", "format": "uuid" }
    },
    "required": [
        "id",
        "companyId",
        "clientId",
        "debtCode",
        "totalAmount",
        "currency",
        "dueDate",
        "issueDate",
        "status",
        "createdAt",
        "createdBy"
    ]
}
