{
  "id": "tradle.MyCustomerOnboarding",
  "title": "My Customer Pass",
  "subClassOf": "tradle.MyProduct",
  "type": "tradle.Model",
  "properties": {
    "entityRole": {
      "type": "string"
    },
    "myProductId": {
      "title": "Customer ID",
      "type": "string"
    },
    "firstName": {
      "type": "string",
      "immutable": true
    },
    "lastName": {
      "type": "string",
      "immutable": true
    },
    "owner": {
      "type": "object",
      "ref": "tradle.Identity"
    },
    "phone": {
      "type": "string",
      "range": "phone",
      "keyboard": "phone-pad",
      "sample": "phone.phoneNumber",
      "description": "Please enter your phone number"
    },
    "email": {
      "type": "string",
      "range": "email",
      "keyboard": "email-address"
    },
    "revoked": {
      "type": "boolean"
    },
    "mySentPayments": {
      "type": "array",
      "items": {
        "ref": "tradle.C2CPayment",
        "backlink": "from"
      }
    },
    "myReceivedPayments": {
      "type": "array",
      "items": {
        "ref": "tradle.C2CPayment",
        "backlink": "to"
      }
    },
    "contacts": {
      "type": "array",
      "items": {
        "ref": "tradle.CustomerContactInformation",
        "backlink": "owner"
      }
    },
    "personal_group": {
      "type": "string",
      "title": "Personal",
      "list": [
        "firstName",
        "lastName",
        "email"
      ]
    },
    "payments_group": {
      "type": "string",
      "title": "Payments",
      "list": [
        "mySentPayments",
        "myReceivedPayments"
      ]
    }
  },
  "required": [
    "myProductId",
    "email"
  ],
  "viewCols": [
    "myProductId",
    "firstName",
    "lastName",
    "email",
    "mySentPayments",
    "myReceivedPayments"
  ],
  "indexes": [
    {
      "hashKey": "myProductId",
      "rangeKey": "_time"
    },
    {
      "hashKey": "owner._permalink",
      "rangeKey": "_time"
    },
    {
      "hashKey": "_t",
      "rangeKey": "_time"
    },
    {
      "hashKey": "_orgOrAuthor",
      "rangeKey": [
        "_t",
        "_time"
      ]
    }
  ]
}