feat: refs #8312 add flippingCost column to Cubos view #3407
|
@ -0,0 +1,27 @@
|
||||||
|
ALTER TABLE vn.business
|
||||||
|
ADD CONSTRAINT `business_companyCodeFk` FOREIGN KEY (`companyCodeFk`) REFERENCES `company` (`code`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- Auto-generated SQL script. Actual values for binary/complex data types may differ - what you see is the default string representation of values.
|
||||||
|
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
|
||||||
|
VALUES ('BusinessReasonEnd','find','*','ALLOW','ROLE','hr');
|
||||||
|
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
|
||||||
|
VALUES ('CalendarType','find','*','ALLOW','ROLE','hr');
|
||||||
|
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
|
||||||
|
VALUES ('OccupationCode','find','*','ALLOW','ROLE','hr');
|
||||||
|
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
|
||||||
|
VALUES ('BusinessReasonEnd','find','*','ALLOW','ROLE','hr');
|
||||||
|
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
|
||||||
|
VALUES ('WorkerBusinessProfessionalCategory','find','*','ALLOW','ROLE','hr');
|
||||||
|
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
|
||||||
|
VALUES ('WorkerBusinessAgreement','find','*','ALLOW','ROLE','hr');
|
||||||
|
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
|
||||||
|
VALUES ('WorkerBusinessType','find','*','ALLOW','ROLE','hr');
|
||||||
|
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
|
||||||
|
VALUES ('PayrollCategory','find','*','ALLOW','ROLE','hr');
|
||||||
|
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
|
||||||
|
VALUES ('Worker','__get__business','*','ALLOW','ROLE','hr');
|
||||||
|
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
|
||||||
|
VALUES ('Worker','__create__business','*','ALLOW','ROLE','hr');
|
||||||
|
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
|
||||||
|
VALUES ('Business','crud','*','ALLOW','ROLE','hr');
|
||||||
|
|
|
@ -139,5 +139,23 @@
|
||||||
},
|
},
|
||||||
"Xdiario": {
|
"Xdiario": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
|
},
|
||||||
|
"BusinessReasonEnd": {
|
||||||
|
"dataSource": "vn"
|
||||||
|
},
|
||||||
|
"OccupationCode": {
|
||||||
|
"dataSource": "vn"
|
||||||
|
},
|
||||||
|
"WorkerBusinessProfessionalCategory": {
|
||||||
|
"dataSource": "vn"
|
||||||
|
},
|
||||||
|
"CalendarType": {
|
||||||
|
"dataSource": "vn"
|
||||||
|
},
|
||||||
|
"WorkerBusinessType": {
|
||||||
|
"dataSource": "vn"
|
||||||
|
},
|
||||||
|
"PayrollCategory": {
|
||||||
|
"dataSource": "vn"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"name": "BusinessReasonEnd",
|
||||||
|
"base": "VnModel",
|
||||||
|
"options": {
|
||||||
|
"mysql": {
|
||||||
|
"table": "businessReasonEnd"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"reason": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -13,6 +13,63 @@
|
||||||
},
|
},
|
||||||
"workcenterFk" : {
|
"workcenterFk" : {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
|
},
|
||||||
|
"companyCodeFk" : {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"started" : {
|
||||||
|
"type": "date"
|
||||||
|
},
|
||||||
|
"ended" : {
|
||||||
|
"type": "date"
|
||||||
|
},
|
||||||
|
"workerBusiness" : {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"reasonEndFk" : {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"payedHolidays" : {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"occupationCodeFk" : {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"workerFk" : {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"notes" : {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"departmentFk": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"workerBusinessProfessionalCategoryFk": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"calendarTypeFk": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"isHourlyLabor": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"rate": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"workerBusinessCategoryFk": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"workerBusinessTypeFk": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"amount": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"workerBusinessAgreementFk": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"basicSalary": {
|
||||||
|
"type": "number"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"relations": {
|
"relations": {
|
||||||
|
@ -25,6 +82,59 @@
|
||||||
"type": "belongsTo",
|
"type": "belongsTo",
|
||||||
"model": "Department",
|
"model": "Department",
|
||||||
"foreignKey": "departmentFk"
|
"foreignKey": "departmentFk"
|
||||||
}
|
},
|
||||||
|
"workCenter": {
|
||||||
|
"type": "belongsTo",
|
||||||
|
"model": "WorkCenter",
|
||||||
|
"foreignKey": "workcenterFk"
|
||||||
|
},
|
||||||
|
"companyCode": {
|
||||||
|
"type": "belongsTo",
|
||||||
|
"model": "Company",
|
||||||
|
"foreignKey": "companyCodeFk",
|
||||||
|
"primaryKey": "code"
|
||||||
|
},
|
||||||
|
"reasonEnd": {
|
||||||
|
"type": "belongsTo",
|
||||||
|
"model": "BusinessReasonEnd",
|
||||||
|
"foreignKey": "reasonEndFk"
|
||||||
|
},
|
||||||
|
"occupationCode": {
|
||||||
|
"type": "belongsTo",
|
||||||
|
"model": "OccupationCode",
|
||||||
|
"foreignKey":"occupationCodeFk",
|
||||||
|
"primaryKey": "code"
|
||||||
|
},
|
||||||
|
"payrollCategory": {
|
||||||
|
"type": "belongsTo",
|
||||||
|
"model": "PayrollCategory",
|
||||||
|
"foreignKey":"workerBusinessCategoryFk"
|
||||||
|
},
|
||||||
|
"workerBusinessProfessionalCategory": {
|
||||||
|
"type": "belongsTo",
|
||||||
|
"model": "WorkerBusinessProfessionalCategory",
|
||||||
|
"foreignKey": "workerBusinessProfessionalCategoryFk"
|
||||||
|
},
|
||||||
|
"calendarType": {
|
||||||
|
"type": "belongsTo",
|
||||||
|
"model": "CalendarType",
|
||||||
|
"foreignKey": "calendarTypeFk"
|
||||||
|
},
|
||||||
|
"workerBusinessCategory": {
|
||||||
|
"type": "belongsTo",
|
||||||
|
"model": "WorkerBusinessCategory",
|
||||||
|
"foreignKey": "workerBusinessCategoryFk"
|
||||||
|
},
|
||||||
|
"workerBusinessType": {
|
||||||
|
"type": "belongsTo",
|
||||||
|
"model": "WorkerBusinessType",
|
||||||
|
"foreignKey": "workerBusinessTypeFk"
|
||||||
|
},
|
||||||
|
"workerBusinessAgreement": {
|
||||||
|
"type": "belongsTo",
|
||||||
|
"model": "WorkerBusinessAgreement",
|
||||||
|
"foreignKey": "workerBusinessAgreementFk"
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"name": "CalendarType",
|
||||||
|
"base": "VnModel",
|
||||||
|
"options": {
|
||||||
|
"mysql": {
|
||||||
|
"table": "calendarType"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"hoursWeek": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"isPartial": "number"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"name": "OccupationCode",
|
||||||
|
"base": "VnModel",
|
||||||
|
"options": {
|
||||||
|
"mysql": {
|
||||||
|
"table": "occupationCode"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"code": {
|
||||||
|
"type": "string",
|
||||||
|
"id": true
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "PayrollCategory",
|
||||||
|
"base": "VnModel",
|
||||||
|
"options": {
|
||||||
|
"mysql": {
|
||||||
|
"table": "payrollCategories"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"rate": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "WorkerBusinessProfessionalCategory",
|
||||||
|
"base": "VnModel",
|
||||||
|
"options": {
|
||||||
|
"mysql": {
|
||||||
|
"table": "professionalCategory"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"code": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
"name": "WorkerBusinessAgreement",
|
||||||
|
"base": "VnModel",
|
||||||
|
"options": {
|
||||||
|
"mysql": {
|
||||||
|
"table": "workerBusinessAgreement"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"monthHolidays": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"yearsHours": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"started": {
|
||||||
|
"type": "date"
|
||||||
|
},
|
||||||
|
"ended": {
|
||||||
|
"type": "date"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"name": "WorkerBusinessType",
|
||||||
|
"base": "VnModel",
|
||||||
|
"options": {
|
||||||
|
"mysql": {
|
||||||
|
"table": "workerBusinessType"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "number",
|
||||||
|
"id": true
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"isFullTime": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"isPermanent": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"hasHolidayEntitlement": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -75,6 +75,9 @@
|
||||||
},
|
},
|
||||||
"isSsDiscounted": {
|
"isSsDiscounted": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"businessFk": {
|
||||||
|
"type": "number"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"relations": {
|
"relations": {
|
||||||
|
@ -103,6 +106,11 @@
|
||||||
"model": "WorkerDepartment",
|
"model": "WorkerDepartment",
|
||||||
"foreignKey": "id"
|
"foreignKey": "id"
|
||||||
},
|
},
|
||||||
|
"currentBusiness": {
|
||||||
|
"type": "belongsTo",
|
||||||
|
"model": "Business",
|
||||||
|
"foreignKey": "businessFk"
|
||||||
|
},
|
||||||
"collegues": {
|
"collegues": {
|
||||||
"type": "hasMany",
|
"type": "hasMany",
|
||||||
"model": "WorkerTeamCollegues",
|
"model": "WorkerTeamCollegues",
|
||||||
|
@ -113,6 +121,11 @@
|
||||||
"model": "Locker",
|
"model": "Locker",
|
||||||
"foreignKey": "workerFk"
|
"foreignKey": "workerFk"
|
||||||
},
|
},
|
||||||
|
"business": {
|
||||||
|
"type": "hasMany",
|
||||||
|
"model": "Business",
|
||||||
|
"foreignKey": "workerFk"
|
||||||
|
},
|
||||||
"medicalReview": {
|
"medicalReview": {
|
||||||
"type": "hasMany",
|
"type": "hasMany",
|
||||||
"model": "MedicalReview",
|
"model": "MedicalReview",
|
||||||
|
@ -259,12 +272,36 @@
|
||||||
"relation": "department",
|
"relation": "department",
|
||||||
"scope": {
|
"scope": {
|
||||||
"fields": [
|
"fields": [
|
||||||
"name"
|
"id"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"relation": "business",
|
||||||
|
"scope": {
|
||||||
|
"fields": [
|
||||||
|
"id",
|
||||||
|
"started",
|
||||||
|
"ended",
|
||||||
|
"reasonEndFk",
|
||||||
|
"departmentFk",
|
||||||
|
"workerBusinessProfessionalCategoryFk"
|
||||||
|
],
|
||||||
|
"include": [
|
||||||
|
{
|
||||||
|
"relation": "reasonEnd",
|
||||||
|
"scope": {
|
||||||
|
"fields": [
|
||||||
|
"id",
|
||||||
|
"reason"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"relation": "boss",
|
"relation": "boss",
|
||||||
"scope": {
|
"scope": {
|
||||||
|
@ -312,7 +349,8 @@
|
||||||
"educationLevelFk",
|
"educationLevelFk",
|
||||||
"originCountryFk",
|
"originCountryFk",
|
||||||
"maritalStatus",
|
"maritalStatus",
|
||||||
"SSN"
|
"SSN",
|
||||||
|
"businessFk"
|
||||||
],
|
],
|
||||||
"include": [
|
"include": [
|
||||||
{
|
{
|
||||||
|
@ -323,6 +361,48 @@
|
||||||
"phone"
|
"phone"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"relation": "currentBusiness",
|
||||||
|
"scope": {
|
||||||
|
"fields": [
|
||||||
|
"id",
|
||||||
|
"started",
|
||||||
|
"ended",
|
||||||
|
"reasonEndFk",
|
||||||
|
"departmentFk",
|
||||||
|
"workerBusinessProfessionalCategoryFk"
|
||||||
|
],
|
||||||
|
"include": [
|
||||||
|
{
|
||||||
|
"relation": "reasonEnd",
|
||||||
|
"scope": {
|
||||||
|
"fields": [
|
||||||
|
"id",
|
||||||
|
"reason"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"relation": "department",
|
||||||
|
"scope": {
|
||||||
|
"fields": [
|
||||||
|
"id",
|
||||||
|
"name"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"relation": "workerBusinessProfessionalCategory",
|
||||||
|
"scope": {
|
||||||
|
"fields": [
|
||||||
|
"id",
|
||||||
|
"description"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue