erDiagram
hr_employee ||--o{ hr_attendance : "has"
hr_employee ||--o{ hr_leave : "has"
hr_employee ||--o{ hr_expense : "has"
hr_employee ||--o{ hr_applicant : "was"
hr_employee ||--|| hr_employee : "parent of"
hr_department ||--o{ hr_employee : "includes"
hr_department ||--|| hr_department : "parent of"
hr_job ||--o{ hr_employee : "assigned"
hr_job ||--o{ hr_applicant : "applied to"
hr_employee {
int id
string name "従業員名"
string work_email "メールアドレス"
date hire_date "入社日"
int job_id "職種"
int department_id "部門"
int parent_id "上司(別の従業員)"
}
hr_department {
int id
string name "部門名"
int parent_id "親部門"
string manager_id "部門責任者"
}
hr_attendance {
int id
int employee_id
datetime check_in "出勤時刻"
datetime check_out "退勤時刻"
}
hr_leave {
int id
int employee_id
date date_from "開始日"
date date_to "終了日"
string state "承認状態"
}
hr_expense {
int id
int employee_id
string description "内容"
float amount "金額"
string state "承認状態"
}
hr_applicant {
int id
string name "応募者名"
int job_id
int employee_id "採用された場合のみ"
string stage "応募ステージ"
}
hr_job {
int id
string name "職種名"
string department_id "部門"
}
コメントを残す