{
    "fields": {
        "number": {
            "type": "autoincrement",
            "index": true,
            "dbType": "bigint"
        },
        "targetType": {
            "type": "varchar",
            "view": "views/action-history-record/fields/target-type",
            "translation": "Global.scopeNames"
        },
        "target": {
            "type": "linkParent",
            "view": "views/action-history-record/fields/target"
        },
        "data": {
            "type": "jsonObject"
        },
        "action": {
            "type": "enum",
            "options": ["read", "update", "create", "delete"]
        },
        "createdAt": {
            "type": "datetime",
            "hasSeconds": true
        },
        "user": {
            "type": "link",
            "view": "views/fields/user"
        },
        "userType": {
            "type": "foreign",
            "link": "user",
            "field": "type",
            "view": "views/fields/foreign-enum",
            "notStorable": true
        },
        "ipAddress": {
            "type": "varchar",
            "maxLength": 39
        },
        "authToken": {
            "type": "link"
        },
        "authLogRecord": {
            "type": "link"
        }
    },
    "links": {
        "user": {
            "type": "belongsTo",
            "entity": "User"
        },
        "target": {
            "type": "belongsToParent"
        },
        "authToken": {
            "type": "belongsTo",
            "entity": "AuthToken",
            "foreignName": "id",
            "foreign": "actionHistoryRecords"
        },
        "authLogRecord": {
            "type": "belongsTo",
            "entity": "AuthLogRecord",
            "foreignName": "id",
            "foreign": "actionHistoryRecords"
        }
    },
    "collection": {
        "orderBy": "number",
        "order": "desc",
        "textFilterFields": ["ipAddress", "userName"],
        "countDisabled": true
    },
    "hooksDisabled": true
}
