feat: roadMap refs #7195

This commit is contained in:
Sergio De la torre 2024-05-31 13:08:48 +02:00
parent 2b1ebee206
commit 2985e1c9e8
3 changed files with 37 additions and 16 deletions

View File

@ -9,21 +9,28 @@
},
"properties": {
"id": {
"id": true,
"type": "number",
"forceId": false
"id": true,
"type": "number",
"forceId": false
},
"name": {
"type": "string"
"type": "string"
},
"code": {
"type": "string"
"type": "string"
},
"isInventory": {
"type": "number"
"type": "number"
},
"isManaged":{
"type": "boolean"
"isManaged": {
"type": "boolean"
}
},
"relations": {
"address": {
"type": "belongsTo",
"model": "Address",
"foreignKey": "addressFk"
}
},
"acls": [
@ -34,5 +41,11 @@
"permission": "ALLOW"
}
],
"scope" : {"where": {"isForTicket": {"neq": 0}}}
"scope": {
"where": {
"isForTicket": {
"neq": 0
}
}
}
}

View File

@ -0,0 +1,8 @@
-- Place your SQL code here
USE vn;
ALTER TABLE vn.roadmap ADD kmStart mediumint(9) DEFAULT NULL NULL;
ALTER TABLE vn.roadmap ADD kmEnd mediumint(9) DEFAULT NULL NULL;
ALTER TABLE vn.roadmap ADD started DATETIME NULL;
ALTER TABLE vn.roadmap ADD finished DATETIME NULL;

View File

@ -3,7 +3,7 @@
"base": "VnModel",
"options": {
"mysql": {
"table": "roadmap"
"table": "roadmap"
}
},
"properties": {
@ -43,8 +43,8 @@
"type": "string"
}
},
"relations": {
"worker": {
"relations": {
"worker": {
"type": "belongsTo",
"model": "Worker",
"foreignKey": "id"
@ -57,7 +57,7 @@
"roadmapStop": {
"type": "hasMany",
"model": "RoadmapStop",
"foreignKey": "roadmapFk"
"foreignKey": "roadMapFk"
}
}
}
}