{
    "fields": {
        "name": {
            "type": "varchar",
            "required": true,
            "pattern": "$noBadCharacters"
        },
        "description": {
            "type": "text"
        },
        "createdAt": {
            "type": "datetime",
            "readOnly": true
        },
        "modifiedAt": {
            "type": "datetime",
            "readOnly": true
        },
        "createdBy": {
            "type": "link",
            "readOnly": true,
            "view": "views/fields/user"
        },
        "modifiedBy": {
            "type": "link",
            "readOnly": true,
            "view": "views/fields/user"
        },
        "assignedUser": {
            "type": "link",
            "required": false,
            "view": "views/fields/assigned-user"
        },
        "teams": {
            "type": "linkMultiple",
            "view": "views/fields/teams"
        },
        "lastCall": {
            "notNull": false,
            "type": "datetime",
            "useNumericFormat": true,
            "minuteStep": 1,
            "readOnly": true,
            "tooltip": true,
            "isCustom": true
        },
        "callCount": {
            "type": "int",
            "required": true,
            "default": 0,
            "readOnly": true,
            "tooltip": true,
            "isCustom": true
        },
        "status": {
            "type": "enum",
            "required": true,
            "options": [
                "",
                "Offen",
                "Zurückgestellt",
                "Wird angerufen",
                "Warte auf neuen Anruf",
                "Dauerhaft nicht erreicht",
                "Warte auf Mandatierung",
                "Mandat erteilt",
                "Kein Fall",
                "Abgebrochen",
                "Nicht Mandatiert"
            ],
            "style": {
                "": null,
                "Offen": null,
                "Zurückgestellt": "info",
                "Wird angerufen": "info",
                "Warte auf neuen Anruf": "info",
                "Dauerhaft nicht erreicht": "warning",
                "Warte auf Mandatierung": "primary",
                "Mandat erteilt": "success",
                "Kein Fall": "warning",
                "Abgebrochen": "warning",
                "Nicht Mandatiert": "danger"
            },
            "default": "Offen",
            "audited": true,
            "tooltip": true,
            "maxLength": 100,
            "isCustom": true
        },
        "eMailErstgesprch": {
            "type": "wysiwyg",
            "required": true,
            "isCustom": true,
            "height": 250,
            "useIframe": false,
            "default": "Sie haben geschildert,",
            "tooltip": true
        },
        "kaltmiete": {
            "type": "currency",
            "required": true,
            "onlyDefaultCurrency": true,
            "conversionDisabled": true,
            "min": 1,
            "decimal": true,
            "tooltip": true,
            "isCustom": true
        },
        "bKVorauszahlung": {
            "type": "currency",
            "required": true,
            "onlyDefaultCurrency": true,
            "conversionDisabled": true,
            "default": 0,
            "min": 0,
            "decimal": true,
            "isCustom": true
        },
        "warmmiete": {
            "type": "currency",
            "onlyDefaultCurrency": true,
            "conversionDisabled": true,
            "decimal": true,
            "isCustom": true,
            "readOnly": true,
            "required": true
        },
        "erfolgsaussichten": {
            "type": "enum",
            "required": true,
            "options": [
                "Gute Erfolgsaussichten",
                "Begrenzte Erfolgsaussichten",
                "Abhängig von Beweisaufnahme"
            ],
            "style": {
                "Gute Erfolgsaussichten": null,
                "Begrenzte Erfolgsaussichten": null,
                "Abhängig von Beweisaufnahme": null
            },
            "default": "Gute Erfolgsaussichten",
            "labelType": null,
            "maxLength": 100,
            "isCustom": true
        },
        "bKPauschale": {
            "type": "currency",
            "required": true,
            "default": 0,
            "min": 0,
            "decimal": true,
            "tooltip": true,
            "isCustom": true,
            "onlyDefaultCurrency": true
        },
        "streitwert": {
            "type": "currency",
            "required": true,
            "default": 0,
            "decimal": true,
            "tooltip": true,
            "isCustom": true,
            "onlyDefaultCurrency": true,
            "readOnly": true
        },
        "anruferIst": {
            "type": "enum",
            "required": true,
            "options": [
                "Vermieter",
                "Kontaktperson",
                "Großvermieter",
                "Hausverwaltung"
            ],
            "style": {
                "Vermieter": null,
                "Kontaktperson": null,
                "Großvermieter": null,
                "Hausverwaltung": null
            },
            "default": "Vermieter",
            "maxLength": 100,
            "isCustom": true
        },
        "statusMietverhltnis": {
            "type": "enum",
            "required": true,
            "optionsReference": "CVmhMietverhltnis.status",
            "default": "Gekündigt",
            "style": [],
            "maxLength": 100,
            "isCustom": true
        },
        "nutzungsart": {
            "type": "enum",
            "required": true,
            "optionsReference": "CVmhMietverhltnis.nutzungsart",
            "style": [],
            "maxLength": 100,
            "isCustom": true
        },
        "kndigungsgrundMietverhltnis": {
            "type": "enum",
            "required": true,
            "optionsReference": "CVmhMietverhltnis.kndigungsgrundWohnraum",
            "default": "Mietrückstand",
            "style": {},
            "maxLength": 100,
            "isCustom": true
        },
        "kndigungsfristMietverhltnis": {
            "notNull": false,
            "type": "date",
            "required": true,
            "isCustom": true,
            "tooltip": true
        },
        "besorgnisNichtRechtzeitigerAuszug": {
            "notNull": true,
            "type": "bool",
            "isCustom": true
        },
        "kostenKndigungsservice": {
            "type": "currency",
            "required": true,
            "onlyDefaultCurrency": true,
            "conversionDisabled": true,
            "default": 250,
            "min": 250,
            "decimal": true,
            "isCustom": true
        },
        "gerichtskosten": {
            "type": "currency",
            "required": true,
            "onlyDefaultCurrency": true,
            "conversionDisabled": true,
            "min": 1,
            "decimal": true,
            "isCustom": true
        },
        "anwaltskosten": {
            "type": "currency",
            "required": true,
            "onlyDefaultCurrency": true,
            "conversionDisabled": true,
            "min": 1,
            "decimal": true,
            "isCustom": true
        },
        "eMailErstgesprch2": {
            "type": "wysiwyg",
            "required": true,
            "default": "Bitte teilen Sie noch mit: \n- Namen und Anschrift des/der Zeugen mit, welche die Übergabe der Kündigung bestätigen können. \n- - den aktuellen Mietrückstand (bspw. 2000 EUR, Miete 01/25, 02/25, 03/25, 04/25)",
            "height": 350,
            "isCustom": true
        },
        "aquiseplattform": {
            "type": "enum",
            "required": true,
            "options": [
                "vermieterhelden.de",
                "CRM"
            ],
            "style": {
                "vermieterhelden.de": null,
                "CRM": null
            },
            "default": "vermieterhelden.de",
            "readOnly": true,
            "maxLength": 100,
            "isCustom": true
        },
        "gclid": {
            "type": "varchar",
            "maxLength": 100,
            "readOnly": true,
            "options": [],
            "isCustom": true
        },
        "utm_source": {
            "type": "varchar",
            "maxLength": 255,
            "readOnly": true,
            "isCustom": true
        },
        "utm_medium": {
            "type": "varchar",
            "maxLength": 255,
            "readOnly": true,
            "isCustom": true
        },
        "utm_campaign": {
            "type": "varchar",
            "maxLength": 255,
            "readOnly": true,
            "isCustom": true
        },
        "utm_term": {
            "type": "varchar",
            "maxLength": 255,
            "readOnly": true,
            "isCustom": true
        },
        "utm_content": {
            "type": "varchar",
            "maxLength": 255,
            "readOnly": true,
            "isCustom": true
        },
        "ad_group": {
            "type": "varchar",
            "maxLength": 255,
            "readOnly": true,
            "isCustom": true
        },
        "keyword": {
            "type": "varchar",
            "maxLength": 255,
            "readOnly": true,
            "isCustom": true
        },
        "campaign_id": {
            "type": "varchar",
            "maxLength": 100,
            "readOnly": true,
            "isCustom": true
        },
        "landing_page": {
            "type": "varchar",
            "maxLength": 500,
            "readOnly": true,
            "isCustom": true
        },
        "referrer": {
            "type": "varchar",
            "maxLength": 500,
            "readOnly": true,
            "isCustom": true
        },
        "anzahlVermieter": {
            "type": "int",
            "required": true,
            "default": null,
            "min": 1,
            "isCustom": true,
            "tooltip": true
        },
        "anzahlMieter": {
            "type": "int",
            "required": true,
            "min": 1,
            "tooltip": true,
            "isCustom": true
        },
        "anzahlSonstigeVolljhrigeBewohner": {
            "type": "int",
            "required": true,
            "min": 0,
            "tooltip": true,
            "isCustom": true
        },
        "erforderlicheUnterlagen": {
            "type": "checklist",
            "storeArrayValues": true,
            "required": true,
            "default": [
                "Mietvertrag",
                "SonstigeUnterlagen"
            ],
            "options": [
                "Mietvertrag",
                "Kündigung",
                "Einlieferungsbeleg",
                "OPKonto",
                "WiderspruchMieter",
                "SonstigeUnterlagen"
            ],
            "isCustom": true
        },
        "erstberaterEinschtzungDISGTyp": {
            "type": "enum",
            "required": true,
            "optionsReference": "Contact.cDISGTyp",
            "default": "Unbekannt",
            "style": [],
            "tooltip": true,
            "maxLength": 100,
            "isCustom": true
        },
        "auergerichtlicheGesetzlicheGebhren": {
            "type": "currency",
            "required": true,
            "onlyDefaultCurrency": true,
            "conversionDisabled": true,
            "min": 1,
            "decimal": true,
            "tooltip": true,
            "isCustom": true
        },
        "beendigungstatbestand": {
            "type": "enum",
            "required": true,
            "optionsReference": "CVmhMietverhltnis.beendigungsTatbestand",
            "default": "Kündigung Vermieter",
            "style": [],
            "maxLength": 100,
            "isCustom": true
        },
        "contact": {
            "type": "link"
        },
        "nchsterAnruf": {
            "notNull": false,
            "type": "datetime",
            "minuteStep": 5,
            "tooltip": true,
            "isCustom": true
        },
        "runWorkflow": {
            "type": "link-button",
            "mode": "runEspoWorkflow",
            "popupHeight": 800,
            "popupWidth": 600,
            "style": "primary",
            "buttonSize": "btn-md",
            "confirmationDialog": true,
            "confirmationText": "Soll der Vorgang abgeschlossen und die Ersteinschätzung versandt werden?",
            "title": "runWorkflow Title",
            "isCustom": true,
            "default": null,
            "buttonLabel": "Erstberatung versenden",
            "readOnly": true
        }
    },
    "links": {
        "createdBy": {
            "type": "belongsTo",
            "entity": "User"
        },
        "modifiedBy": {
            "type": "belongsTo",
            "entity": "User"
        },
        "assignedUser": {
            "type": "belongsTo",
            "entity": "User"
        },
        "teams": {
            "type": "hasMany",
            "entity": "Team",
            "relationName": "entityTeam",
            "layoutRelationshipsDisabled": true
        },
        "meetings": {
            "type": "hasMany",
            "entity": "Meeting",
            "foreign": "parent"
        },
        "calls": {
            "type": "hasMany",
            "entity": "Call",
            "foreign": "parent"
        },
        "tasks": {
            "type": "hasChildren",
            "entity": "Task",
            "foreign": "parent"
        },
        "emails": {
            "type": "hasChildren",
            "entity": "Email",
            "foreign": "parent",
            "layoutRelationshipsDisabled": true
        },
        "contact": {
            "type": "belongsTo",
            "foreign": "cVmhErstgespraechs",
            "entity": "Contact",
            "audited": false,
            "isCustom": true
        },
        "dokumentesvmherstgespraech": {
            "type": "hasMany",
            "relationName": "cDokumenteVmhErstgespraech",
            "foreign": "vmhErstgespraechsdokumente",
            "entity": "CDokumente",
            "audited": false,
            "isCustom": true
        }
    },
    "collection": {
        "orderBy": "createdAt",
        "order": "desc",
        "textFilterFields": [
            "name",
            "eMailErstgesprch"
        ],
        "fullTextSearch": true,
        "countDisabled": false
    },
    "indexes": {
        "name": {
            "columns": [
                "name",
                "deleted"
            ]
        },
        "assignedUser": {
            "columns": [
                "assignedUserId",
                "deleted"
            ]
        },
        "createdAt": {
            "columns": [
                "createdAt"
            ]
        },
        "createdAtId": {
            "unique": true,
            "columns": [
                "createdAt",
                "id"
            ]
        }
    },
    "optimisticConcurrencyControl": false
}