modelos para el microservicio item

This commit is contained in:
Daniel Herrero 2017-12-20 09:53:50 +01:00
parent bd80c9cbe0
commit dc03c5f453
9 changed files with 253 additions and 0 deletions

View File

@ -0,0 +1,28 @@
{
"name": "Ink",
"base": "VnModel",
"options": {
"mysql": {
"table": "ink",
"database": "vn"
}
},
"properties": {
"id": {
"type": "Number",
"id": true,
"description": "Identifier"
},
"name": {
"type": "String"
},
"picture": {
"mysql": {
"dataType": "blob"
}
},
"showOrder": {
"type": "number"
}
}
}

View File

@ -0,0 +1,32 @@
{
"name": "Intrastat",
"base": "VnModel",
"options": {
"mysql": {
"table": "intrastat",
"database": "vn"
}
},
"properties": {
"id": {
"type": "Number",
"id": true,
"description": "Identifier"
},
"description": {
"type": "String"
}
},
"relations": {
"taxClass": {
"type": "belongsTo",
"model": "TaxClass",
"foreignKey": "taxClassFk"
},
"taxCode": {
"type": "belongsTo",
"model": "TaxCode",
"foreignKey": "taxCodeFk"
}
}
}

View File

@ -46,6 +46,26 @@
"type": "belongsTo", "type": "belongsTo",
"model": "ItemType", "model": "ItemType",
"foreignKey": "typeFk" "foreignKey": "typeFk"
},
"ink": {
"type": "belongsTo",
"model": "Ink",
"foreignKey": "inkFk"
},
"origin": {
"type": "belongsTo",
"model": "Origin",
"foreignKey": "originFk"
},
"producer": {
"type": "belongsTo",
"model": "Producer",
"foreignKey": "producerFk"
},
"intrastat": {
"type": "belongsTo",
"model": "Intrastat",
"foreignKey": "intrastatFk"
} }
} }
} }

View File

@ -0,0 +1,23 @@
{
"name": "Origin",
"base": "VnModel",
"options": {
"mysql": {
"table": "origin",
"database": "vn"
}
},
"properties": {
"id": {
"type": "Number",
"id": true,
"description": "Identifier"
},
"code": {
"type": "String"
},
"name": {
"type": "String"
}
}
}

View File

@ -0,0 +1,20 @@
{
"name": "Producer",
"base": "VnModel",
"options": {
"mysql": {
"table": "producer",
"database": "vn"
}
},
"properties": {
"id": {
"type": "Number",
"id": true,
"description": "Identifier"
},
"name": {
"type": "String"
}
}
}

View File

@ -0,0 +1,23 @@
{
"name": "TaxClass",
"base": "VnModel",
"options": {
"mysql": {
"table": "taxClass",
"database": "vn"
}
},
"properties": {
"id": {
"type": "Number",
"id": true,
"description": "Identifier"
},
"description": {
"type": "String"
},
"code": {
"type": "String"
}
}
}

View File

@ -0,0 +1,47 @@
{
"name": "TaxCode",
"base": "VnModel",
"options": {
"mysql": {
"table": "taxCode",
"database": "vn"
}
},
"properties": {
"id": {
"type": "Number",
"id": true,
"description": "Identifier"
},
"dated": {
"type": "date"
},
"code": {
"type": "String"
},
"rate": {
"type": "number"
},
"equalizationTax": {
"type": "number"
},
"type": {
"type": "String"
},
"isActive": {
"type": "Boolean"
}
},
"relations": {
"taxType": {
"type": "belongsTo",
"model": "TaxType",
"foreignKey": "taxTypeFk"
},
"link": {
"type": "belongsTo",
"model": "Link",
"foreignKey": "linkFk"
}
}
}

View File

@ -0,0 +1,36 @@
{
"name": "TaxType",
"base": "VnModel",
"options": {
"mysql": {
"table": "taxType",
"database": "vn"
}
},
"properties": {
"id": {
"type": "Number",
"id": true,
"description": "Identifier"
},
"nickname": {
"type": "String"
},
"serial": {
"type": "String"
},
"TIPOOPE": {
"type": "String"
},
"description": {
"type": "String"
}
},
"relations": {
"country": {
"type": "belongsTo",
"model": "Country",
"foreignKey": "countryFk"
}
}
}

View File

@ -29,5 +29,29 @@
}, },
"ItemType": { "ItemType": {
"dataSource": "vn" "dataSource": "vn"
},
"Ink": {
"dataSource": "vn"
},
"Origin": {
"dataSource": "vn"
},
"Producer": {
"dataSource": "vn"
},
"Intrastat": {
"dataSource": "vn"
},
"TaxClass": {
"dataSource": "vn"
},
"TaxCode": {
"dataSource": "vn"
},
"TaxType": {
"dataSource": "vn"
},
"Country": {
"dataSource": "salix"
} }
} }