{
    "fields": {
        "name": {
            "type": "varchar",
            "required": true,
            "pattern": "$noBadCharacters"
        },
        "status": {
            "type": "enum",
            "options": [
                "Draft",
                "In Review",
                "Published",
                "Archived"
            ],
            "style": {
                "Published": "primary",
                "Archived": "info"
            },
            "displayAsLabel": true,
            "labelType": "state",
            "view": "crm:views/knowledge-base-article/fields/status",
            "default": "Draft",
            "fieldManagerAdditionalParamList": [
                {
                    "name": "activeOptions",
                    "view": "views/admin/field-manager/fields/not-actual-options"
                }
            ],
            "activeOptions": ["Published"],
            "customizationOptionsReferenceDisabled": true
        },
        "language": {
            "type": "enum",
            "view": "crm:views/knowledge-base-article/fields/language",
            "customizationOptionsDisabled": true,
            "customizationOptionsReferenceDisabled": true
        },
        "type": {
            "type": "enum",
            "options": ["Article"],
            "default": "Article"
        },
        "portals": {
            "type": "linkMultiple",
            "tooltip": true
        },
        "publishDate": {
            "type": "date"
        },
        "expirationDate": {
            "type": "date",
            "after": "publishDate"
        },
        "order": {
            "type": "int",
            "disableFormatting": true,
            "textFilterDisabled": true
        },
        "description": {
            "type": "text"
        },
        "createdAt": {
            "type": "datetime",
            "readOnly": true,
            "fieldManagerParamList": [
                "useNumericFormat"
            ]
        },
        "modifiedAt": {
            "type": "datetime",
            "readOnly": true,
            "fieldManagerParamList": [
                "useNumericFormat"
            ]
        },
        "createdBy": {
            "type": "link",
            "readOnly": true,
            "fieldManagerParamList": []
        },
        "modifiedBy": {
            "type": "link",
            "readOnly": true,
            "fieldManagerParamList": []
        },
        "assignedUser": {
            "type": "link",
            "view": "views/fields/assigned-user"
        },
        "teams": {
            "type": "linkMultiple",
            "view": "views/fields/teams"
        },
        "categories": {
            "type": "linkMultiple",
            "view": "views/fields/link-multiple-category-tree"
        },
        "attachments": {
            "type": "attachmentMultiple"
        },
        "body": {
            "type": "wysiwyg"
        },
        "bodyPlain": {
            "type": "text",
            "readOnly": true,
            "directUpdateDisabled": true,
            "fieldManagerParamList": []
        }
    },
    "links": {
        "cases": {
            "type": "hasMany",
            "entity": "Case",
            "foreign": "articles"
        },
        "portals": {
            "type": "hasMany",
            "entity": "Portal",
            "foreign": "articles"
        },
        "createdBy": {
            "type": "belongsTo",
            "entity": "User"
        },
        "modifiedBy": {
            "type": "belongsTo",
            "entity": "User"
        },
        "assignedUser": {
            "type": "belongsTo",
            "entity": "User"
        },
        "teams": {
            "type": "hasMany",
            "entity": "Team",
            "relationName": "entityTeam",
            "layoutRelationshipsDisabled": true
        },
        "categories": {
            "type": "hasMany",
            "foreign": "articles",
            "entity": "KnowledgeBaseCategory"
        }
    },
    "collection": {
        "orderBy": "order",
        "order": "asc",
        "textFilterFields": [
            "name",
            "bodyPlain"
        ],
        "fullTextSearch": true
    },
    "optimisticConcurrencyControl": true
}
