2016-11-17 11:56:35 +00:00
|
|
|
{
|
|
|
|
"name": "Client",
|
|
|
|
"base": "PersistedModel",
|
2017-01-12 10:02:22 +00:00
|
|
|
"validateUpsert": true,
|
2016-11-17 11:56:35 +00:00
|
|
|
"properties": {
|
|
|
|
"id": {
|
|
|
|
"type": "Number",
|
|
|
|
"id": true,
|
|
|
|
"description": "Identifier"
|
|
|
|
},
|
|
|
|
"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"
|
|
|
|
},
|
2016-12-15 07:31:15 +00:00
|
|
|
"registerDate": {
|
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
|
|
|
},
|
|
|
|
"consignee": {
|
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
|
|
|
},
|
|
|
|
"postcode": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
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-01-02 06:28:36 +00:00
|
|
|
"cyc": {
|
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-01-24 11:30:17 +00:00
|
|
|
"gestdoc": {
|
|
|
|
"type": "Number"
|
2017-01-02 06:28:36 +00:00
|
|
|
},
|
2016-11-17 11:56:35 +00:00
|
|
|
"surcharge": {
|
|
|
|
"type": "boolean",
|
|
|
|
"description": "The client has equivalence surcharge"
|
|
|
|
},
|
|
|
|
"hasToInvoice": {
|
|
|
|
"type": "boolean",
|
|
|
|
"description": "Global invoicing enabled for the client"
|
|
|
|
},
|
|
|
|
"invoiceByEmail": {
|
|
|
|
"type": "boolean",
|
|
|
|
"description": "Send invoices by email"
|
2016-12-15 15:55:11 +00:00
|
|
|
},
|
|
|
|
"relations": {
|
2017-01-24 11:30:17 +00:00
|
|
|
"type": {
|
|
|
|
"salesPerson": {
|
|
|
|
"type": "belongsTo",
|
|
|
|
"model": "SalesPerson",
|
|
|
|
"foreignKey": "salePersonId"
|
|
|
|
},
|
|
|
|
"paymentMethod": {
|
|
|
|
"type": "belongsTo",
|
|
|
|
"model": "PaymentMethod",
|
|
|
|
"foreingKey": "payId"
|
|
|
|
},
|
|
|
|
"country": {
|
|
|
|
"type": "belongsTo",
|
|
|
|
"model": "Country",
|
|
|
|
"foreignKey": "countryId"
|
|
|
|
},
|
|
|
|
"province": {
|
|
|
|
"type": "belongsTo",
|
|
|
|
"model": "Province",
|
|
|
|
"foreignKey": "provinceId"
|
|
|
|
}
|
2016-12-15 15:55:11 +00:00
|
|
|
}
|
2016-11-17 11:56:35 +00:00
|
|
|
}
|
2017-01-24 11:30:17 +00:00
|
|
|
},
|
|
|
|
"validations": [],
|
|
|
|
"relations": {
|
|
|
|
"account": {
|
|
|
|
"type": "hasOne",
|
|
|
|
"model": "Account",
|
|
|
|
"foreignKey": "id"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"acls": [],
|
|
|
|
"methods": {}
|
2016-11-17 11:56:35 +00:00
|
|
|
}
|