123 lines
2.6 KiB
JSON
123 lines
2.6 KiB
JSON
{
|
|
"tables":[
|
|
{
|
|
"name":"kpi_department",
|
|
"columns":{
|
|
"id":"pk",
|
|
"name":"string",
|
|
"description":"text"
|
|
}
|
|
},
|
|
{
|
|
"name":"kpi_definition",
|
|
"columns":{
|
|
"id":"pk",
|
|
"code":"string",
|
|
"name":"string",
|
|
"department_id":"fk -> kpi_department.id",
|
|
"kpi_type":"string",
|
|
"description":"text",
|
|
"calculation_method":"string",
|
|
"source_module":"string",
|
|
"active":"boolean"
|
|
}
|
|
},
|
|
{
|
|
"name":"kpi_target",
|
|
"columns":{
|
|
"id":"pk",
|
|
"kpi_definition_id":"fk -> kpi_definition.id",
|
|
"target_value":"float",
|
|
"weight":"float"
|
|
}
|
|
},
|
|
{
|
|
"name":"kpi_target_history",
|
|
"columns":{
|
|
"id":"pk",
|
|
"kpi_target_id":"fk -> kpi_target.id",
|
|
"year":"integer",
|
|
"target_value":"float"
|
|
}
|
|
},
|
|
{
|
|
"name":"kpi_period",
|
|
"columns":{
|
|
"id":"pk",
|
|
"year":"integer",
|
|
"month":"integer",
|
|
"date_start":"date",
|
|
"date_end":"date",
|
|
"status":"string"
|
|
}
|
|
},
|
|
{
|
|
"name":"kpi_assignment",
|
|
"columns":{
|
|
"id":"pk",
|
|
"employee_id":"fk -> hr_employee.id",
|
|
"kpi_definition_id":"fk -> kpi_definition.id",
|
|
"period_id":"fk -> kpi_period.id",
|
|
"target_override":"float",
|
|
"weight_override":"float"
|
|
}
|
|
},
|
|
{
|
|
"name":"kpi_value",
|
|
"columns":{
|
|
"id":"pk",
|
|
"assignment_id":"fk -> kpi_assignment.id",
|
|
"value":"float",
|
|
"source_module":"string",
|
|
"reference_model":"string",
|
|
"reference_id":"integer",
|
|
"created_at":"datetime"
|
|
}
|
|
},
|
|
{
|
|
"name":"kpi_score",
|
|
"columns":{
|
|
"id":"pk",
|
|
"employee_id":"fk -> hr_employee.id",
|
|
"period_id":"fk -> kpi_period.id",
|
|
"total_score":"float",
|
|
"grade":"string",
|
|
"calculated_at":"datetime"
|
|
}
|
|
},
|
|
{
|
|
"name":"kpi_team",
|
|
"columns":{
|
|
"id":"pk",
|
|
"name":"string",
|
|
"department_id":"fk -> kpi_department.id"
|
|
}
|
|
},
|
|
{
|
|
"name":"kpi_team_member",
|
|
"columns":{
|
|
"id":"pk",
|
|
"team_id":"fk -> kpi_team.id",
|
|
"employee_id":"fk -> hr_employee.id"
|
|
}
|
|
},
|
|
{
|
|
"name":"kpi_team_score",
|
|
"columns":{
|
|
"id":"pk",
|
|
"team_id":"fk -> kpi_team.id",
|
|
"period_id":"fk -> kpi_period.id",
|
|
"score":"float"
|
|
}
|
|
},
|
|
{
|
|
"name":"kpi_evidence",
|
|
"columns":{
|
|
"id":"pk",
|
|
"kpi_value_id":"fk -> kpi_value.id",
|
|
"attachment":"string",
|
|
"note":"text"
|
|
}
|
|
}
|
|
]
|
|
} |