salix/modules/supplier/back/models/supplier.json

172 lines
3.5 KiB
JSON

{
"name": "Supplier",
"base": "Loggable",
"log": {
"model":"SupplierLog"
},
"options": {
"mysql": {
"table": "supplier"
}
},
"properties": {
"id": {
"type": "number",
"id": true,
"description": "Identifier"
},
"name": {
"type": "string"
},
"account": {
"type": "string"
},
"countryFk": {
"type": "number"
},
"nif": {
"type": "string"
},
"isFarmer": {
"type": "boolean"
},
"phone": {
"type": "number"
},
"retAccount": {
"type": "number"
},
"commission": {
"type": "boolean"
},
"created": {
"type": "date"
},
"postcodeFk": {
"type": "number"
},
"isActive": {
"type": "boolean"
},
"isOfficial": {
"type": "boolean"
},
"isSerious": {
"type": "boolean"
},
"note": {
"type": "string"
},
"street": {
"type": "string"
},
"city": {
"type": "string"
},
"provinceFk": {
"type": "number"
},
"postCode": {
"type": "string"
},
"payMethodFk": {
"type": "number"
},
"payDemFk": {
"type": "number"
},
"payDay": {
"type": "number"
},
"nickname": {
"type": "string"
},
"workerFk": {
"type": "number"
},
"sageTaxTypeFk": {
"type": "number",
"mysql": {
"columnName": "taxTypeSageFk"
}
},
"sageTransactionTypeFk": {
"type": "number",
"mysql": {
"columnName": "transactionTypeSageFk"
}
},
"sageWithholdingFk": {
"type": "number",
"mysql": {
"columnName": "withholdingSageFk"
}
}
},
"relations": {
"payMethod": {
"type": "belongsTo",
"model": "PayMethod",
"foreignKey": "payMethodFk"
},
"payDem": {
"type": "belongsTo",
"model": "PayDem",
"foreignKey": "payDemFk"
},
"province": {
"type": "belongsTo",
"model": "Province",
"foreignKey": "provinceFk"
},
"country": {
"type": "belongsTo",
"model": "Country",
"foreignKey": "countryFk"
},
"client": {
"type": "belongsTo",
"model": "Client",
"foreignKey": "nif",
"primaryKey": "fi"
},
"worker": {
"type": "belongsTo",
"model": "Worker",
"foreignKey": "workerFk"
},
"sageTaxType": {
"type": "belongsTo",
"model": "SageTaxType",
"foreignKey": "sageTaxTypeFk"
},
"sageTransactionType": {
"type": "belongsTo",
"model": "SageTransactionType",
"foreignKey": "sageTransactionTypeFk"
},
"sageWithholding": {
"type": "belongsTo",
"model": "SageWithholding",
"foreignKey": "sageWithholdingFk"
},
"contacts": {
"type": "hasMany",
"model": "SupplierContact",
"foreignKey": "supplierFk"
},
"addresses": {
"type": "hasMany",
"model": "SupplierAddress",
"foreignKey": "supplierFk"
}
},
"acls": [
{
"accessType": "READ",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW"
}
]
}