Merge pull request 'refs #7407 create models' (!2603) from 7407-workerMedical into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #2603 Reviewed-by: Javier Segarra <jsegarra@verdnatura.es>
This commit is contained in:
commit
b66386fdb1
|
@ -3920,6 +3920,16 @@ INSERT INTO `vn`.`calendarHolidays` (calendarHolidaysTypeFk, dated, calendarHoli
|
|||
(1, '2001-05-17', 1, 5),
|
||||
(1, '2001-05-18', 1, 5);
|
||||
|
||||
INSERT INTO vn.medicalReview
|
||||
(id, workerFk, centerFk, `date`, `time`, isFit, amount, invoice, remark)
|
||||
VALUES(1, 1106, 1, '2000-01-01', '08:10', 1, 200.0, NULL, '');
|
||||
INSERT INTO vn.medicalReview
|
||||
(id, workerFk, centerFk, `date`, `time`, isFit, amount, invoice, remark)
|
||||
VALUES(2, 1106, 2, '2001-01-01', '09:10', 0, 10.0, NULL, NULL);
|
||||
INSERT INTO vn.medicalReview
|
||||
(id, workerFk, centerFk, `date`, `time`, isFit, amount, invoice, remark)
|
||||
VALUES(3, 9, 2, '2000-01-01', '8:00', 1, 150.0, NULL, NULL);
|
||||
|
||||
INSERT INTO vn.payrollComponent
|
||||
(id, name, isSalaryAgreed, isVariable, isException)
|
||||
VALUES
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
-- Place your SQL code here
|
||||
INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId)
|
||||
VALUES
|
||||
('MedicalReview', '*', '*', 'ALLOW', 'ROLE', 'hr'),
|
||||
('MedicalCenter', '*', '*', 'ALLOW', 'ROLE', 'hr'),
|
||||
('Worker', '__get__medicalReview', '*', 'ALLOW', 'ROLE', 'hr');
|
|
@ -125,6 +125,12 @@
|
|||
"Locker": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"MedicalReview": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"MedicalCenter": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"PayrollComponent": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "MedicalCenter",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "medicalCenter"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number",
|
||||
"id": true,
|
||||
"description": "Identifier"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -116,6 +116,11 @@
|
|||
"model": "Locker",
|
||||
"foreignKey": "workerFk"
|
||||
},
|
||||
"medicalReview": {
|
||||
"type": "hasMany",
|
||||
"model": "MedicalReview",
|
||||
"foreignKey": "workerFk"
|
||||
},
|
||||
"incomes": {
|
||||
"type": "hasMany",
|
||||
"model": "WorkerIncome",
|
||||
|
|
Loading…
Reference in New Issue