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

153 lines
2.8 KiB
JSON

{
"name": "Client",
"base": "VnModel",
"options": {
"mysql": {
"table": "client",
"database": "vn"
}
},
"properties": {
"id": {
"type": "Number",
"id": true,
"description": "Identifier"
},
"name": {
"type": "string",
"required": true
},
"fi": {
"type": "string",
"description": "Fiscal indentifier"
},
"socialName": {
"type": "string",
"required": true
},
"contact": {
"type": "string"
},
"street": {
"type": "string"
},
"city": {
"type": "string"
},
"postcode": {
"type": "string"
},
"email": {
"type": "string"
},
"phone": {
"type": "string"
},
"mobile": {
"type": "string"
},
"isActive": {
"type": "boolean"
},
"credit": {
"type": "Number"
},
"creditInsurance": {
"type": "Number"
},
"iban": {
"type": "string"
},
"dueDay": {
"type": "Number"
},
"isEqualizated": {
"type": "boolean",
"description": "The client has equalization tax"
},
"hasToInvoiceByAddress": {
"type": "boolean",
"description": "The client has to be invoiced by address"
},
"hasToInvoice": {
"type": "boolean",
"description": "Global invoicing enabled for the client"
},
"isToBeMailed": {
"type": "boolean",
"description": "Send invoices by email"
},
"hasSepaVnl": {
"type": "boolean"
},
"hasCoreVnl": {
"type": "boolean"
},
"hasCoreVnh": {
"type": "boolean"
},
"isTaxDataChecked":{
"type": "boolean"
},
"eypbc": {
"type": "boolean"
},
"quality": {
"type": "Number"
},
"isVies": {
"type": "boolean"
},
"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"
}
}
}