{
  "name": "Role_Customer",
  "base": "AccountRole",
  "properties": {
    "braintreeId": {
      "type": "string",
      "required": false,
      "description": "Reference to braintree customer"
    }
  },
  "relations": {
    "invoices": {
        "type": "hasMany",
        "model": "Payment_Invoice",
        "foreignKey": "customerId"
    },
    "payments": {
        "type": "hasMany",
        "model": "Payment_Method",
        "foreignKey": "customerId"
    }
  },
  "acls": [{
    "accessType": "*",
    "principalType": "ROLE",
    "principalId": "$everyone",
    "permission": "DENY"
  },{
    "accessType": "*",
    "principalType": "ROLE",
    "principalId": "customer",
    "permission": "ALLOW"
  }]
}
