refs #7407 create models
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Carlos Satorres 2024-06-18 10:12:22 +02:00
parent 7566ca1acb
commit e404688042
4 changed files with 83 additions and 1 deletions

View File

@ -124,6 +124,12 @@
},
"Locker": {
"dataSource": "vn"
},
"MedicalReview": {
"dataSource": "vn"
},
"MedicalCenter": {
"dataSource": "vn"
}
}

View File

@ -0,0 +1,19 @@
{
"name": "MedicalCenter",
"base": "VnModel",
"options": {
"mysql": {
"table": "medicalCenter"
}
},
"properties": {
"id": {
"type": "number",
"id": true,
"description": "Identifier"
},
"name": {
"type": "string"
}
}
}

View File

@ -0,0 +1,52 @@
{
"name": "MedicalReview",
"base": "VnModel",
"options": {
"mysql": {
"table": "medicalReview"
}
},
"properties": {
"id": {
"type": "number",
"id": true,
"description": "Identifier"
},
"workerFk": {
"type": "number"
},
"centerFk": {
"type": "number"
},
"date": {
"type": "date"
},
"time": {
"type": "string"
},
"isFit": {
"type": "boolean"
},
"amount": {
"type": "number"
},
"invoice": {
"type": "string"
},
"remark": {
"type": "string"
}
},
"relations": {
"worker": {
"type": "belongsTo",
"model": "Worker",
"foreignKey": "workerFk"
},
"center": {
"type": "belongsTo",
"model": "MedicalCenter",
"foreignKey": "centerFk"
}
}
}

View File

@ -115,6 +115,11 @@
"type": "hasMany",
"model": "Locker",
"foreignKey": "workerFk"
},
"medicalReview": {
"type": "hasMany",
"model": "MedicalReview",
"foreignKey": "workerFk"
}
},
"acls": [
@ -126,4 +131,4 @@
"principalId": "$owner"
}
]
}
}