{
    "fields": {
        "name": {
            "type": "varchar",
            "required": true,
            "view": "views/admin/job/fields/name"
        },
        "status": {
            "type": "enum",
            "options": ["Pending", "Running", "Success", "Failed"],
            "default": "Pending"
        },
        "executeTime": {
            "type": "datetime",
            "required": true
        },
        "serviceName": {
            "type": "varchar",
            "required": true,
            "maxLength":100
        },
        "method": {
            "type": "varchar",
            "required": true,
            "maxLength":100
        },
        "data": {
            "type": "jsonObject"
        },
        "scheduledJob": {
            "type": "link"
        },
        "attempts": {
            "type": "int"
        },
        "failedAttempts": {
            "type": "int"
        },
        "createdAt": {
            "type": "datetime",
            "readOnly": true
        },
        "modifiedAt": {
            "type": "datetime",
            "readOnly": true
        }
    },
    "links": {
        "scheduledJob": {
            "type": "belongsTo",
            "entity": "ScheduledJob"
        }
    },
    "collection": {
        "sortBy": "createdAt",
        "asc": false
    },
    "indexes": {
        "executeTime": {
            "columns": ["status", "executeTime"]
        },
        "status": {
            "columns": ["status", "deleted"]
        }
    }
}
