{ "name": "Supplier", "base": "VnModel", "mixins": { "Loggable": true }, "options": { "mysql": { "table": "supplier" } }, "properties": { "id": { "type": "number", "id": true, "description": "Identifier" }, "name": { "type": "string" }, "account": { "type": "string" }, "countryFk": { "type": "number" }, "nif": { "type": "string" }, "phone": { "type": "number" }, "retAccount": { "type": "number" }, "commission": { "type": "boolean" }, "created": { "type": "date" }, "postcodeFk": { "type": "number" }, "isActive": { "type": "boolean" }, "isOfficial": { "type": "boolean" }, "isReal": { "type": "boolean" }, "isTrucker": { "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" } }, "isPayMethodChecked": { "type": "boolean" }, "supplierActivityFk": { "type": "string" }, "healthRegister": { "type": "string" }, "isVies": { "type": "boolean" } }, "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" }, "supplierActivity": { "type": "belongsTo", "model": "SupplierActivity", "foreignKey": "supplierActivityFk" } } }