2016-11-17 11:56:35 +00:00
|
|
|
{
|
|
|
|
"name": "Client",
|
2017-02-28 17:10:11 +00:00
|
|
|
"base": "MyModel",
|
2017-01-12 10:02:22 +00:00
|
|
|
"validateUpsert": true,
|
2016-11-17 11:56:35 +00:00
|
|
|
"properties": {
|
|
|
|
"id": {
|
|
|
|
"type": "Number",
|
|
|
|
"id": true,
|
2017-02-07 16:02:17 +00:00
|
|
|
"description": "Identifier"
|
2016-11-17 11:56:35 +00:00
|
|
|
},
|
|
|
|
"name": {
|
|
|
|
"type": "string",
|
2017-01-12 10:02:22 +00:00
|
|
|
"required": true
|
2017-01-24 11:30:17 +00:00
|
|
|
},
|
2016-11-17 11:56:35 +00:00
|
|
|
"fi": {
|
|
|
|
"type": "string",
|
|
|
|
"description": "Fiscal indetifier"
|
|
|
|
},
|
|
|
|
"socialName": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2017-05-09 12:04:44 +00:00
|
|
|
"creationTime": {
|
2016-11-17 11:56:35 +00:00
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"contact": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2017-01-02 06:28:36 +00:00
|
|
|
"street": {
|
2017-01-09 13:58:44 +00:00
|
|
|
"type": "string"
|
2017-01-02 06:28:36 +00:00
|
|
|
},
|
|
|
|
"city": {
|
2017-01-09 13:58:44 +00:00
|
|
|
"type": "string"
|
2017-01-02 06:28:36 +00:00
|
|
|
},
|
2017-05-09 12:04:44 +00:00
|
|
|
"postcode": {
|
|
|
|
"type": "string"
|
2017-04-28 13:04:29 +00:00
|
|
|
},
|
2016-11-17 11:56:35 +00:00
|
|
|
"email": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"phone": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2017-01-17 10:26:59 +00:00
|
|
|
"mobile": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2016-11-17 11:56:35 +00:00
|
|
|
"fax": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"active": {
|
|
|
|
"type": "boolean"
|
2016-12-15 15:55:11 +00:00
|
|
|
},
|
2016-11-17 11:56:35 +00:00
|
|
|
"credit": {
|
|
|
|
"type": "Number"
|
|
|
|
},
|
2017-05-09 12:04:44 +00:00
|
|
|
"creditInsurance": {
|
2016-11-17 11:56:35 +00:00
|
|
|
"type": "Number"
|
|
|
|
},
|
|
|
|
"iban": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2017-01-02 06:28:36 +00:00
|
|
|
"dueDay": {
|
|
|
|
"type": "Number"
|
|
|
|
},
|
2017-05-10 15:18:25 +00:00
|
|
|
"equalizationTax": {
|
2016-11-17 11:56:35 +00:00
|
|
|
"type": "boolean",
|
2017-05-10 15:18:25 +00:00
|
|
|
"description": "The client has equalization tax"
|
2016-11-17 11:56:35 +00:00
|
|
|
},
|
|
|
|
"hasToInvoice": {
|
|
|
|
"type": "boolean",
|
|
|
|
"description": "Global invoicing enabled for the client"
|
|
|
|
},
|
|
|
|
"invoiceByEmail": {
|
|
|
|
"type": "boolean",
|
|
|
|
"description": "Send invoices by email"
|
2017-05-05 10:54:47 +00:00
|
|
|
},
|
2017-05-09 12:04:44 +00:00
|
|
|
"sepaVnl": {
|
|
|
|
"type": "boolean"
|
|
|
|
},
|
|
|
|
"coreVnl": {
|
|
|
|
"type": "boolean"
|
|
|
|
},
|
|
|
|
"coreVnh": {
|
|
|
|
"type": "boolean"
|
|
|
|
},
|
|
|
|
"eypbc": {
|
|
|
|
"type": "boolean"
|
|
|
|
},
|
|
|
|
"quality": {
|
2017-05-05 10:54:47 +00:00
|
|
|
"type": "Number"
|
|
|
|
},
|
2017-05-09 12:04:44 +00:00
|
|
|
"vies": {
|
2017-05-05 10:54:47 +00:00
|
|
|
"type": "Number"
|
2017-05-09 12:04:44 +00:00
|
|
|
},
|
|
|
|
"isRelevant": {
|
|
|
|
"type": "boolean"
|
|
|
|
},
|
|
|
|
"typeFk": {
|
|
|
|
"type": "Number"
|
|
|
|
},
|
|
|
|
"accountingAccount": {
|
|
|
|
"type": "string"
|
2016-11-17 11:56:35 +00:00
|
|
|
}
|
2017-01-24 11:30:17 +00:00
|
|
|
},
|
2017-03-14 12:08:55 +00:00
|
|
|
"validations": [],
|
2017-01-24 11:30:17 +00:00
|
|
|
"relations": {
|
2017-05-09 12:04:44 +00:00
|
|
|
"accountFk": {
|
2017-05-12 09:14:55 +00:00
|
|
|
"type": "belongsTo",
|
2017-01-24 11:30:17 +00:00
|
|
|
"model": "Account",
|
|
|
|
"foreignKey": "id"
|
2017-02-21 10:36:43 +00:00
|
|
|
},
|
2017-05-09 12:04:44 +00:00
|
|
|
"payMethodFk": {
|
2017-05-12 09:14:55 +00:00
|
|
|
"type": "belongsTo",
|
2017-04-28 13:04:29 +00:00
|
|
|
"model": "PayMethod",
|
2017-05-12 09:14:55 +00:00
|
|
|
"foreignKey": "payMethodFk"
|
2017-04-28 13:04:29 +00:00
|
|
|
},
|
2017-05-09 12:04:44 +00:00
|
|
|
"salesPersonFk": {
|
2017-05-12 09:14:55 +00:00
|
|
|
"type": "belongsTo",
|
2017-04-28 13:04:29 +00:00
|
|
|
"model": "Employee",
|
2017-05-12 09:14:55 +00:00
|
|
|
"foreignKey": "salesPersonFk"
|
|
|
|
},
|
|
|
|
"provinceFk":{
|
|
|
|
"type": "belongsTo",
|
|
|
|
"model": "Province",
|
|
|
|
"foreignKey": "provinceFk"
|
|
|
|
},
|
|
|
|
"countryFk":{
|
|
|
|
"type": "belongsTo",
|
|
|
|
"model": "Country",
|
|
|
|
"foreignKey": "countryFk"
|
|
|
|
},
|
|
|
|
"contactChannelFk":{
|
|
|
|
"type": "belongsTo",
|
|
|
|
"model": "ContactChannel",
|
|
|
|
"foreignKey": "contactChannelFk"
|
2017-04-28 13:04:29 +00:00
|
|
|
},
|
2017-05-09 12:04:44 +00:00
|
|
|
"addressesFk": {
|
2017-02-21 10:36:43 +00:00
|
|
|
"type": "hasMany",
|
|
|
|
"model": "Address",
|
2017-05-09 12:04:44 +00:00
|
|
|
"foreignKey": "clientFk"
|
2017-01-24 11:30:17 +00:00
|
|
|
}
|
|
|
|
},
|
2017-03-14 12:08:55 +00:00
|
|
|
"acls": [
|
|
|
|
{
|
|
|
|
"accessType": "*",
|
|
|
|
"principalType": "ROLE",
|
|
|
|
"principalId": "$everyone",
|
|
|
|
"permission": "ALLOW"
|
2017-02-07 16:02:17 +00:00
|
|
|
}
|
2017-03-14 12:08:55 +00:00
|
|
|
],
|
2017-05-12 09:14:55 +00:00
|
|
|
"methods": {},
|
|
|
|
"scopes": {
|
|
|
|
"test": {
|
|
|
|
"where": {
|
|
|
|
"name": "Verdnatura"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-11-17 11:56:35 +00:00
|
|
|
}
|