const {
    Collection
} = require("@bitev.io/core/types");

module.exports = Collection({
    "activeTask": false,
    "singleType": false,
    "hidden": false,
    "mode": "model",
    "slug": "Roles",
    "timestamps": true,
    "auth": {
        "enabled": false,
        "by": "email"
    },
    "admin": {
        "timestampsFormat": "YYYY-MM-DD HH:mm:ss"
    },
    "fields": [{
        "admin": {
            "sortable": false,
            "readonly": false,
            "hidden": false,
            "required": false
        },
        "name": "name",
        "type": "string",
        "unique": true,
        "hasMany": false,
        "linked": true,
        "required": false,
        "relationType": "one-to-many",
        "private": false
    }, {
        "admin": {
            "label": "Admin access",
            "sortable": false,
            "readonly": false,
            "hidden": false,
            "required": false
        },
        "name": "admin_access",
        "type": "boolean",
        "unique": false,
        "hasMany": false,
        "linked": true,
        "defaultValue": "false",
        "required": false,
        "relationType": "one-to-many",
        "private": false,
        "onSideRelation": false
    }, {
        "admin": {
            "sortable": false,
            "readonly": false,
            "hidden": false,
            "required": false
        },
        "name": "description",
        "type": "textarea",
        "unique": false,
        "hasMany": false,
        "linked": true,
        "required": false,
        "relationType": "one-to-many",
        "private": false
    }, {
        "admin": {
            "sortable": false,
            "readonly": false,
            "hidden": false,
            "required": false
        },
        "name": "permissions",
        "type": "json",
        "unique": false,
        "hasMany": false,
        "linked": true,
        "required": false,
        "relationType": "one-to-many",
        "private": false
    }, {
        "admin": {
            "sortable": false,
            "readonly": false,
            "hidden": false,
            "required": false
        },
        "name": "users",
        "type": "relationship",
        "unique": false,
        "hasMany": true,
        "relationTo": "Users",
        "linked": false,
        "required": false,
        "relationType": "one-to-many",
        "relationSideName": "role",
        "private": false,
        "onSideRelation": false
    }, {
        "admin": {
            "sortable": false,
            "readonly": false,
            "hidden": false,
            "required": false
        },
        "name": "modelviews",
        "type": "relationship",
        "unique": false,
        "hasMany": true,
        "relationTo": "modelviews",
        "linked": false,
        "required": false,
        "relationType": "many-to-many",
        "relationSideName": "roles",
        "private": false,
        "onSideRelation": true,
        "self": false,
        "selfName": "roles"
    }, {
        "admin": {
            "label": "Abilities",
            "sortable": false,
            "readonly": false,
            "hidden": false,
            "required": false,
            "displayTemplate": "return item.id"
        },
        "name": "abilities",
        "type": "json",
        "unique": false,
        "hasMany": false,
        "linked": true,
        "required": false,
        "relationType": "one-to-many",
        "private": false,
        "index": false,
        "onSideRelation": false,
        "computedFx": {
            "active": true,
            "fx": "return ;"
        },
        "medias": {
            "allowedTypes": ["images", "videos", "files"]
        }
    }, 
    ],
    "_v": true
})