{
  "id": "tradle.Profile",
  "type": "tradle.Model",
  "title": "Profile",
  "sort": "lastMessageTime",
  "plural": "Profiles",
  "properties": {
    "securityCode": {
      "type": "string",
      "readOnly": true
    },
    "city": {
      "type": "string"
    },
    "country": {
      "type": "object",
      "ref": "tradle.Country"
    },
    "postalCode": {
      "type": "string"
    },
    "region": {
      "type": "string"
    },
    "street": {
      "type": "string"
    },
    "formattedAddress": {
      "type": "string",
      "displayAs": "{1}, {2}, {3} {4}, {5}",
      "group": [
        "street",
        "city",
        "region",
        "postalCode",
        "country"
      ],
      "title": "Address",
      "readOnly": true
    },
    "firstName": {
      "type": "string"
    },
    "lastName": {
      "type": "string"
    },
    "address_group": {
      "title": "Home Address",
      "type": "string"
    },
    "employment_group": {
      "title": "Employment",
      "type": "string"
    },
    "formatted": {
      "type": "string",
      "displayAs": "{2} {1}",
      "group": [
        "lastName",
        "firstName"
      ],
      "readOnly": true,
      "displayName": true
    },
    "language": {
      "type": "object",
      "ref": "tradle.Language"
    },
    "middleName": {
      "type": "string"
    },
    "organization": {
      "type": "object",
      "readOnly": true,
      "ref": "tradle.Organization"
    },
    "bot": {
      "type": "boolean",
      "readOnly": true
    },
    "isEmployee": {
      "type": "boolean",
      "readOnly": true
    },
    "verifiedByMe": {
      "type": "array",
      "allowRoles": "me",
      "icon": "ios-checkmark-circle-outline",
      "items": {
        "readOnly": true,
        "ref": "tradle.Verification",
        "backlink": "from"
      }
    },
    "myProducts": {
      "type": "array",
      "title": "Products",
      "icon": "ios-disc-outline",
      "allowRoles": "me",
      "hidden": true,
      "items": {
        "readOnly": true,
        "ref": "tradle.MyProduct",
        "backlink": "to"
      }
    },
    "myVerifications": {
      "type": "array",
      "title": "Verifications",
      "allowRoles": "me",
      "icon": "ios-checkmark-circle-outline",
      "items": {
        "readOnly": true,
        "ref": "tradle.Verification",
        "backlink": "to"
      }
    },
    "myForms": {
      "type": "array",
      "title": "My Data",
      "allowRoles": "me",
      "icon": "ios-body-outline",
      "items": {
        "readOnly": true,
        "ref": "tradle.Form",
        "backlink": "from"
      }
    },
    "myDocuments": {
      "type": "array",
      "title": "Documents",
      "allowRoles": "me",
      "icon": "ios-paper-outline",
      "items": {
        "readOnly": true,
        "ref": "tradle.Document",
        "backlink": "from"
      }
    },
    "useTouchId": {
      "type": "boolean"
    },
    "useGesturePassword": {
      "type": "boolean"
    },
    "photos": {
      "type": "array",
      "range": "photo",
      "allowPicturesFromLibrary": true,
      "cameraType": "front",
      "inlined": true,
      "items": {
        "ref": "tradle.Photo"
      }
    },
    "coverPhoto": {
      "inlined": true,
      "type": "object",
      "allowPicturesFromLibrary": true,
      "coverPhoto": true,
      "ref": "tradle.Photo"
    },
    "summary": {
      "type": "string"
    },
    "lastMessage": {
      "type": "string"
    },
    "lastMessageTime": {
      "type": "date"
    },
    "websites": {
      "type": "array",
      "inlined": true,
      "hidden": true,
      "items": {
        "ref": "tradle.WebSite"
      }
    }
  },
  "required": [
    "firstName"
  ],
  "gridCols": [
    "formatted",
    "lastMessage",
    "lastMessageTime",
    "organization"
  ],
  "viewCols": [
    "address_group",
    "formattedAddress",
    "employment_group",
    "organization",
    "myForms",
    "myDocuments",
    "myVerifications",
    "websites",
    "coverPhoto",
    "photos"
  ],
  "editCols": [
    "firstName",
    "coverPhoto"
  ]
}