132 lines
2.3 KiB
JSON
132 lines
2.3 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"
|
|
},
|
|
"registerDate": {
|
|
"type": "string"
|
|
},
|
|
"contact": {
|
|
"type": "string"
|
|
},
|
|
"street": {
|
|
"type": "string"
|
|
},
|
|
"city": {
|
|
"type": "string"
|
|
},
|
|
"province": {
|
|
"type": "Number"
|
|
},
|
|
"country": {
|
|
"type": "Number"
|
|
},
|
|
"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"
|
|
},
|
|
"dms": {
|
|
"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"
|
|
},
|
|
"payMethod": {
|
|
"type": "Number"
|
|
},
|
|
"salesPerson": {
|
|
"type": "Number"
|
|
}
|
|
},
|
|
"validations": [],
|
|
"relations": {
|
|
"account": {
|
|
"type": "hasOne",
|
|
"model": "Account",
|
|
"foreignKey": "id"
|
|
},
|
|
"payMethod": {
|
|
"type": "hasOne",
|
|
"model": "PayMethod",
|
|
"foreignKey": "id"
|
|
},
|
|
"salesPerson": {
|
|
"type": "hasOne",
|
|
"model": "Employee",
|
|
"foreignKey": "id"
|
|
},
|
|
"addresses": {
|
|
"type": "hasMany",
|
|
"model": "Address",
|
|
"foreignKey": "client"
|
|
}
|
|
},
|
|
"acls": [
|
|
{
|
|
"accessType": "*",
|
|
"principalType": "ROLE",
|
|
"principalId": "$everyone",
|
|
"permission": "ALLOW"
|
|
}
|
|
],
|
|
"methods": {}
|
|
}
|