{
    "fields": {
        "name": {
            "type": "varchar",
            "maxLength": 100,
            "pattern": "$noBadCharacters",
            "audited": true
        },
        "roles": {
            "type": "linkMultiple",
            "tooltip": true,
            "audited": true
        },
        "positionList": {
            "type": "array",
            "displayAsList": true,
            "tooltip": true,
            "audited": true
        },
        "userRole": {
            "type": "varchar",
            "notStorable": true,
            "utility": true
        },
        "layoutSet": {
            "type": "link",
            "tooltip": true,
            "audited": true
        },
        "workingTimeCalendar": {
            "type": "link",
            "tooltip": true,
            "audited": true
        },
        "createdAt": {
            "type": "datetime",
            "readOnly": true
        },
        "modifiedAt": {
            "type": "datetime",
            "readOnly": true
        }
    },
    "links": {
        "users": {
            "type": "hasMany",
            "entity": "User",
            "foreign": "teams",
            "columnAttributeMap": {
                "role": "userRole"
            }
        },
        "roles": {
            "type": "hasMany",
            "entity": "Role",
            "foreign": "teams"
        },
        "notes": {
            "type": "hasMany",
            "entity": "Note",
            "foreign": "teams"
        },
        "inboundEmails": {
            "type": "hasMany",
            "entity": "InboundEmail",
            "foreign": "teams"
        },
        "layoutSet": {
            "type": "belongsTo",
            "entity": "LayoutSet",
            "foreign": "teams"
        },
        "workingTimeCalendar": {
            "type": "belongsTo",
            "entity": "WorkingTimeCalendar",
            "foreign": "teams"
        },
        "groupEmailFolders": {
            "type": "hasMany",
            "entity": "GroupEmailFolder",
            "foreign": "teams"
        }
    },
    "collection": {
        "orderBy": "name",
        "order": "asc"
    }
}
