{
    "name": "ItemCategory",
    "base": "VnModel",
    "options": {
        "mysql": {
          "table": "itemCategory"
        }
    },
    "properties": {
        "id": {
            "type": "number",
            "id": true,
            "description": "Identifier"
        },
        "name": {
            "type": "string"
        },
        "display": {
            "type": "boolean"
        },
        "icon": {
            "type": "string"
        }
    },
    "relations": {
        "itemTypes": {
            "type": "hasMany",
            "model": "ItemType",
            "foreignKey": "categoryFk"
        }
    },
    "acls": [
      {
        "accessType": "READ",
        "principalType": "ROLE",
        "principalId": "$everyone",
        "permission": "ALLOW"
      }
    ],
    "scope": {
        "where": {
            "display": {"gte": 1}
        }
    }
}