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

module.exports = Collection({
    "activeTask": false,
    "singleType": false,
    "hidden": false,
    "mode": "model",
    "slug": "modelviews",
    "timestamps": true,
    "auth": {
        "enabled": false,
        "by": "email"
    },
    "admin": {
        "label": "Modelviews",
        "timestampsFormat": "YY-MM-DD ,HH:mm:ss a"
    },
    "fields": [{
        "admin": {
            "label": "Name",
            "sortable": false,
            "readonly": false,
            "hidden": false,
            "required": false,
            "displayTemplate": "return item.id"
        },
        "name": "name",
        "type": "string",
        "unique": true,
        "hasMany": false,
        "linked": true,
        "required": true,
        "relationType": "one-to-many",
        "private": false,
        "onSideRelation": false,
        "computedFx": {
            "active": true,
            "fx": "return ;"
        },
        "medias": {
            "allowedTypes": ["images", "videos", "files"]
        }
    }, {
        "admin": {
            "label": "Active",
            "sortable": false,
            "readonly": false,
            "hidden": false,
            "required": false,
            "displayTemplate": "return item.id"
        },
        "name": "active",
        "type": "boolean",
        "unique": false,
        "hasMany": false,
        "linked": true,
        "defaultValue": "false",
        "required": false,
        "relationType": "one-to-many",
        "private": false,
        "onSideRelation": false,
        "computedFx": {
            "active": true,
            "fx": "return ;"
        },
        "medias": {
            "allowedTypes": ["images", "videos", "files"]
        }
    }, {
        "admin": {
            "label": "Config",
            "sortable": false,
            "readonly": false,
            "hidden": false,
            "required": false,
            "displayTemplate": "return item.id"
        },
        "name": "config",
        "type": "json",
        "unique": false,
        "hasMany": false,
        "linked": true,
        "required": false,
        "relationType": "one-to-many",
        "private": false,
        "onSideRelation": false,
        "computedFx": {
            "active": true,
            "fx": "return ;"
        },
        "medias": {
            "allowedTypes": ["images", "videos", "files"]
        }
    }, {
        "admin": {
            "label": "Roles",
            "sortable": false,
            "readonly": false,
            "hidden": false,
            "required": false,
            "displayTemplate": "return item.id"
        },
        "name": "roles",
        "type": "relationship",
        "unique": false,
        "hasMany": true,
        "relationTo": "Roles",
        "linked": true,
        "required": false,
        "relationType": "many-to-many",
        "relationSideName": "modelviews",
        "private": false,
        "onSideRelation": false,
        "computedFx": {
            "active": true,
            "fx": "return ;"
        },
        "medias": {
            "allowedTypes": ["images", "videos", "files"]
        },
        "self": false,
        "selfName": "roles"
    }, {
        "admin": {
            "label": "Description",
            "sortable": false,
            "readonly": false,
            "hidden": false,
            "required": false,
            "displayTemplate": "return item.id"
        },
        "name": "description",
        "type": "textarea",
        "unique": false,
        "hasMany": false,
        "linked": true,
        "required": false,
        "relationType": "one-to-many",
        "private": false,
        "onSideRelation": false,
        "computedFx": {
            "active": true,
            "fx": "return ;"
        },
        "medias": {
            "allowedTypes": ["images", "videos", "files"]
        }
    }],
    "behavior": "basic",
    "realtime": false,
    "_v": true
})