diff --git a/services/pedidos/Dockerfile b/services/order/Dockerfile similarity index 81% rename from services/pedidos/Dockerfile rename to services/order/Dockerfile index 6b66fd4b5..d18fd02a8 100644 --- a/services/pedidos/Dockerfile +++ b/services/order/Dockerfile @@ -1,6 +1,6 @@ FROM vn-loopback:latest -COPY pedidos /app +COPY order /app WORKDIR /app CMD ["pm2-docker", "./server/server.js"] diff --git a/services/pedidos/common/models/orderRow.json b/services/order/common/models/order-row.json similarity index 96% rename from services/pedidos/common/models/orderRow.json rename to services/order/common/models/order-row.json index 0cbdbd8bf..e28787a31 100644 --- a/services/pedidos/common/models/orderRow.json +++ b/services/order/common/models/order-row.json @@ -41,12 +41,12 @@ } }, "relations": { - "itemFk": { + "item": { "type": "belongsTo", "model": "Item", "foreignKey": "itemFk" }, - "orderFk": { + "order": { "type": "belongsTo", "model": "Order", "foreignKey": "orderFk" diff --git a/services/pedidos/common/models/order.json b/services/order/common/models/order.json similarity index 96% rename from services/pedidos/common/models/order.json rename to services/order/common/models/order.json index 428e36f81..bf1e40c82 100644 --- a/services/pedidos/common/models/order.json +++ b/services/order/common/models/order.json @@ -66,17 +66,17 @@ } }, "relations": { - "agencyModeFk": { + "agencyMode": { "type": "belongsTo", "model": "AgencyMode", "foreignKey": "agency_id" }, - "addressFk": { + "address": { "type": "belongsTo", "model": "Address", "foreignKey": "address_id" }, - "deliveryMethodFk": { + "deliveryMethod": { "type": "belongsTo", "model": "DeliveryMethod", "foreignKey": "delivery_method_id" diff --git a/services/pedidos/package.json b/services/order/package.json similarity index 85% rename from services/pedidos/package.json rename to services/order/package.json index 6320016e6..d4c4b2fbb 100644 --- a/services/pedidos/package.json +++ b/services/order/package.json @@ -1,5 +1,5 @@ { - "name": "vn-pedidos", + "name": "vn-order", "version": "1.0.0", "main": "server/server.js", "scripts": { @@ -12,7 +12,7 @@ "url": "https://git.verdnatura.es/salix" }, "license": "GPL-3.0", - "description": "vn-pedidos", + "description": "vn-order", "dependencies": { "uuid": "^3.1.0" } diff --git a/services/pedidos/server/model-config.json b/services/order/server/model-config.json similarity index 100% rename from services/pedidos/server/model-config.json rename to services/order/server/model-config.json diff --git a/services/pedidos/server/server.js b/services/order/server/server.js similarity index 100% rename from services/pedidos/server/server.js rename to services/order/server/server.js diff --git a/services/ticket/common/models/sale-tracking.json b/services/ticket/common/models/sale-tracking.json new file mode 100644 index 000000000..aba08be29 --- /dev/null +++ b/services/ticket/common/models/sale-tracking.json @@ -0,0 +1,39 @@ +{ + "name": "SaleTracking", + "base": "VnModel", + "options": { + "mysql": { + "table": "saleTracking", + "database": "vn" + } + }, + "properties": { + "id": { + "id": true, + "type": "Number", + "forceId": false + }, + "isChecked": { + "type": "boolean" + }, + "created": { + "type": "Date" + }, + "originalQuantity": { + "type": "Number" + } + }, + "relations": { + "sale": { + "type": "belongsTo", + "model": "Sale", + "foreignKey": "saleFk" + }, + "worker": { + "type": "belongsTo", + "model": "Worker", + "foreignKey": "workerFk" + } + } +} + \ No newline at end of file diff --git a/services/ticket/server/model-config.json b/services/ticket/server/model-config.json index 8d38b3582..dfdee74c1 100644 --- a/services/ticket/server/model-config.json +++ b/services/ticket/server/model-config.json @@ -37,8 +37,8 @@ }, "TicketWeekly": { "dataSource": "vn" + }, + "SaleTracking": { + "dataSource": "vn" } } - - -