{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Bill",
    "type": "object",
    "additionalProperties": false,
    "properties": {
        "_id": {
            "type": "integer",
            "description": "A unique ID for Bill"
        },
        "billHeadId": {
            "type": "integer"
        },
        "date": {
            "type": "string",
            "format": "date-time"
        },
        "daysAutoEnter": {
            "type": "integer"
        },
        "frequency": {
            "$ref": "#/definitions/Frequency"
        },
        "transactionId": {
            "type": "integer"
        }
    },
    "definitions": {
        "Frequency": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "label": {
                    "type": "string"
                },
                "recurring": {
                    "type": "boolean"
                },
                "type": {
                    "type": "integer"
                }
            },
            "required": [
                "recurring"
            ]
        }
    }
}