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": { "properties": {
"id": { "id": {
"id": true, "id": true,
"type": "number", "type": "number",
"forceId": false "forceId": false
}, },
"name": { "name": {
"type": "string" "type": "string"
}, },
"code": { "code": {
"type": "string" "type": "string"
}, },
"isInventory": { "isInventory": {
"type": "number" "type": "number"
}, },
"isManaged":{ "isManaged": {
"type": "boolean" "type": "boolean"
}
},
"relations": {
"address": {
"type": "belongsTo",
"model": "Address",
"foreignKey": "addressFk"
} }
}, },
"acls": [ "acls": [
@ -34,5 +41,11 @@
"permission": "ALLOW" "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", "base": "VnModel",
"options": { "options": {
"mysql": { "mysql": {
"table": "roadmap" "table": "roadmap"
} }
}, },
"properties": { "properties": {
@ -43,8 +43,8 @@
"type": "string" "type": "string"
} }
}, },
"relations": { "relations": {
"worker": { "worker": {
"type": "belongsTo", "type": "belongsTo",
"model": "Worker", "model": "Worker",
"foreignKey": "id" "foreignKey": "id"
@ -57,7 +57,7 @@
"roadmapStop": { "roadmapStop": {
"type": "hasMany", "type": "hasMany",
"model": "RoadmapStop", "model": "RoadmapStop",
"foreignKey": "roadmapFk" "foreignKey": "roadMapFk"
} }
} }
} }