salix/services/client/common/models/Client.json

118 lines
2.2 KiB
JSON
Raw Normal View History

{
"name": "Client",
"base": "PersistedModel",
2017-01-12 10:02:22 +00:00
"validateUpsert": true,
"properties": {
"id": {
"type": "Number",
"id": true,
"description": "Identifier"
},
"name": {
"type": "string",
2017-01-12 10:02:22 +00:00
"required": true
},
"fi": {
"type": "string",
"description": "Fiscal indetifier"
},
"socialName": {
"type": "string"
},
2016-12-15 07:31:15 +00:00
"registerDate": {
"type": "string"
},
"contact": {
"type": "string"
},
2017-01-02 06:28:36 +00:00
"street": {
"type": "string"
2017-01-02 06:28:36 +00:00
},
"consignee": {
"type": "string"
2017-01-02 06:28:36 +00:00
},
"city": {
"type": "string"
2017-01-02 06:28:36 +00:00
},
"postcode": {
"type": "string"
},
"email": {
"type": "string"
},
"phone": {
"type": "string"
},
"mobile": {
"type": "string"
},
"fax": {
"type": "string"
},
"active": {
"type": "boolean"
},
"credit": {
"type": "Number"
},
2017-01-02 06:28:36 +00:00
"cyc": {
"type": "Number"
},
"iban": {
"type": "string"
},
2017-01-02 06:28:36 +00:00
"dueDay": {
"type": "Number"
},
"gestdoc": {
"type": "Number"
2017-01-02 06:28:36 +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"
},
"relations": {
"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"
}
}
}
},
"validations": [],
"relations": {
"account": {
"type": "hasOne",
"model": "Account",
"foreignKey": "id"
}
},
"acls": [],
"methods": {}
}