{
    "fields": {
        "name": {
            "type": "personName"
        },
        "salutationName": {
            "type": "enum",
            "options": ["", "Mr.", "Mrs.", "Ms.", "Dr.", "Drs."]
        },
        "firstName": {
            "type": "varchar",
            "maxLength": 100,
            "default":""
        },
        "lastName": {
            "type": "varchar",
            "maxLength": 100,
            "required": true,
            "default":""
        },
        "title": {
            "type": "varchar",
            "maxLength": 100
        },
        "accountName": {
            "type": "varchar",
            "maxLength": 100
        },
        "website": {
            "type": "url"
        },
        "address": {
            "type": "address"
        },
        "addressStreet": {
            "type": "text",
            "maxLength": 255,
            "dbType": "varchar"
        },
        "addressCity": {
            "type": "varchar"
        },
        "addressState": {
            "type": "varchar"
        },
        "addressCountry": {
            "type": "varchar"
        },
        "addressPostalCode": {
            "type": "varchar"
        },
        "emailAddress": {
            "type": "email"
        },
        "phoneNumber": {
            "type": "phone",
            "typeList": ["Mobile", "Office", "Home", "Fax", "Other"],
            "defaultType": "Mobile"
        },
        "doNotCall": {
            "type": "bool"
        },
        "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",
            "view": "views/fields/assigned-user"
        },
        "teams": {
            "type": "linkMultiple",
            "view": "views/fields/teams"
        }
    },
    "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
        }
    },
    "collection": {
        "sortBy": "createdAt",
        "asc": false
    },
    "indexes": {
        "firstName": {
            "columns": ["firstName", "deleted"]
        },
        "name": {
            "columns": ["firstName", "lastName"]
        },
        "assignedUser": {
            "columns": ["assignedUserId", "deleted"]
        }
    }
}
