model saleTracking

This commit is contained in:
Joan Sanchez 2018-06-20 12:47:43 +02:00
parent 37e52b54b0
commit 723ea3f57b
8 changed files with 50 additions and 11 deletions

View File

@ -1,6 +1,6 @@
FROM vn-loopback:latest
COPY pedidos /app
COPY order /app
WORKDIR /app
CMD ["pm2-docker", "./server/server.js"]

View File

@ -41,12 +41,12 @@
}
},
"relations": {
"itemFk": {
"item": {
"type": "belongsTo",
"model": "Item",
"foreignKey": "itemFk"
},
"orderFk": {
"order": {
"type": "belongsTo",
"model": "Order",
"foreignKey": "orderFk"

View File

@ -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"

View File

@ -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"
}

View File

@ -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"
}
}
}

View File

@ -37,8 +37,8 @@
},
"TicketWeekly": {
"dataSource": "vn"
},
"SaleTracking": {
"dataSource": "vn"
}
}