{ "name": "Client", "base": "MyModel", "validateUpsert": true, "properties": { "id": { "type": "Number", "id": true, "description": "Identifier" }, "name": { "type": "string", "required": true }, "fi": { "type": "string", "description": "Fiscal indetifier" }, "socialName": { "type": "string" }, "contact": { "type": "string" }, "street": { "type": "string" }, "city": { "type": "string" }, "postcode": { "type": "string" }, "email": { "type": "string" }, "phone": { "type": "string" }, "mobile": { "type": "string" }, "fax": { "type": "string" }, "active": { "type": "boolean" }, "credit": { "type": "Number" }, "creditInsurance": { "type": "Number" }, "iban": { "type": "string" }, "dueDay": { "type": "Number" }, "equalizationTax": { "type": "boolean", "description": "The client has equalization tax" }, "hasToInvoice": { "type": "boolean", "description": "Global invoicing enabled for the client" }, "invoiceByEmail": { "type": "boolean", "description": "Send invoices by email" }, "sepaVnl": { "type": "boolean" }, "coreVnl": { "type": "boolean" }, "coreVnh": { "type": "boolean" }, "eypbc": { "type": "boolean" }, "quality": { "type": "Number" }, "vies": { "type": "Number" }, "isRelevant": { "type": "boolean" }, "accountingAccount": { "type": "string" }, "created": { "type": "date" } }, "relations": { "account": { "type": "belongsTo", "model": "Account", "foreignKey": "id" }, "payMethod": { "type": "belongsTo", "model": "PayMethod", "foreignKey": "payMethodFk" }, "salesPerson": { "type": "belongsTo", "model": "Employee", "foreignKey": "salesPersonFk" }, "province":{ "type": "belongsTo", "model": "Province", "foreignKey": "provinceFk" }, "country":{ "type": "belongsTo", "model": "Country", "foreignKey": "countryFk" }, "contactChannel":{ "type": "belongsTo", "model": "ContactChannel", "foreignKey": "contactChannelFk" }, "type": { "type": "belongsTo", "model": "ClientType", "foreignKey": "typeFk" }, "addresses": { "type": "hasMany", "model": "Address", "foreignKey": "clientFk" } }, "acls": [ { "accessType": "*", "principalType": "ROLE", "principalId": "$authenticated", "permission": "ALLOW" }, { "accessType": "*", "principalType": "ROLE", "principalId": "$everyone", "permission": "DENY" } ], "validations": [], "methods": {} }