{
    "fields": {
        "name": {
            "type": "varchar",
            "maxLength": 255,
            "required": true
        },
        "rule": {
            "type": "text",
            "required": true
        },
        "scope": {
            "type": "enum",
            "options": ["global", "case", "office"],
            "default": "global"
        },
        "isActive": {
            "type": "bool",
            "default": true
        },
        "createdAt": {
            "type": "datetime",
            "readOnly": true
        },
        "modifiedAt": {
            "type": "datetime",
            "readOnly": true
        },
        "createdBy": {
            "type": "link",
            "readOnly": true
        },
        "modifiedBy": {
            "type": "link",
            "readOnly": true
        }
    },
    "links": {
        "createdBy": {
            "type": "belongsTo",
            "entity": "User"
        },
        "modifiedBy": {
            "type": "belongsTo",
            "entity": "User"
        }
    },
    "indexes": {
        "isActive": {
            "columns": ["isActive", "deleted"]
        },
        "scope": {
            "columns": ["scope", "isActive", "deleted"]
        }
    }
}
