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

118 lines
2.2 KiB
JSON

{
"name": "Client",
"base": "PersistedModel",
"validateUpsert": true,
"properties": {
"id": {
"type": "Number",
"id": true,
"description": "Identifier"
},
"name": {
"type": "string",
"required": true
},
"fi": {
"type": "string",
"description": "Fiscal indetifier"
},
"socialName": {
"type": "string"
},
"registerDate": {
"type": "string"
},
"contact": {
"type": "string"
},
"street": {
"type": "string"
},
"consignee": {
"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"
},
"cyc": {
"type": "Number"
},
"iban": {
"type": "string"
},
"dueDay": {
"type": "Number"
},
"gestdoc": {
"type": "Number"
},
"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": {}
}