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

164 lines
2.8 KiB
JSON

{
"name": "Client",
"base": "MyModel",
"scopes": {
"test": {
"where": {
"name": "Verdnatura"
}
}
},
"validateUpsert": true,
"properties": {
"id": {
"type": "Number",
"id": true,
"description": "Identifier"
},
"name": {
"type": "string",
"required": true
},
"fi": {
"type": "string",
"description": "Fiscal indetifier"
},
"socialName": {
"type": "string"
},
"creationTime": {
"type": "string"
},
"contact": {
"type": "string"
},
"street": {
"type": "string"
},
"city": {
"type": "string"
},
"postcode": {
"type": "string"
},
"provinceFk": {
"type": "Number"
},
"countryFk": {
"type": "Number"
},
"email": {
"type": "string"
},
"phone": {
"type": "string"
},
"mobile": {
"type": "string"
},
"fax": {
"type": "string"
},
"active": {
"type": "boolean"
},
"credit": {
"type": "Number"
},
"creditInsurance": {
"type": "Number"
},
"iban": {
"type": "string"
},
"dueDay": {
"type": "Number"
},
"equalizationTax": {
"type": "boolean",
"description": "The client has equalization tax"
},
"hasToInvoice": {
"type": "boolean",
"description": "Global invoicing enabled for the client"
},
"invoiceByEmail": {
"type": "boolean",
"description": "Send invoices by email"
},
"payMethodFk": {
"type": "Number"
},
"salesPersonFk": {
"type": "Number"
},
"contactChannelFk": {
"type": "Number"
},
"sepaVnl": {
"type": "boolean"
},
"coreVnl": {
"type": "boolean"
},
"coreVnh": {
"type": "boolean"
},
"eypbc": {
"type": "boolean"
},
"quality": {
"type": "Number"
},
"vies": {
"type": "Number"
},
"isRelevant": {
"type": "boolean"
},
"typeFk": {
"type": "Number"
},
"accountingAccount": {
"type": "string"
}
},
"validations": [],
"relations": {
"accountFk": {
"type": "hasOne",
"model": "Account",
"foreignKey": "id"
},
"payMethodFk": {
"type": "hasOne",
"model": "PayMethod",
"foreignKey": "id"
},
"salesPersonFk": {
"type": "hasOne",
"model": "Employee",
"foreignKey": "id"
},
"addressesFk": {
"type": "hasMany",
"model": "Address",
"foreignKey": "clientFk"
},
"chanelFK":{
"type": "hasOne",
"model": "ContactChannel",
"foreignKey": "contactChannelFk"
}
},
"acls": [
{
"accessType": "*",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW"
}
],
"methods": {}
}