Files
EmployeeManagementSystem/src/types/index.ts
2025-11-27 22:50:08 +00:00

79 lines
1.7 KiB
TypeScript

export interface User {
id: number;
username: string;
name: string;
email: string;
role: 'SuperAdmin' | 'Supervisor' | 'Contractor' | 'Employee';
department_id?: number;
contractor_id?: number;
is_active: boolean;
created_at: string;
department_name?: string;
contractor_name?: string;
}
export interface Department {
id: number;
name: string;
created_at: string;
updated_at: string;
}
export interface SubDepartment {
id: number;
department_id: number;
name: string;
primary_activity: string;
created_at: string;
updated_at: string;
}
export interface WorkAllocation {
id: number;
employee_id: number;
supervisor_id: number;
contractor_id: number;
sub_department_id?: number;
description?: string;
assigned_date: string;
status: 'Pending' | 'InProgress' | 'Completed' | 'Cancelled';
completion_date?: string;
rate?: number;
created_at: string;
updated_at: string;
employee_name?: string;
employee_username?: string;
supervisor_name?: string;
contractor_name?: string;
sub_department_name?: string;
department_name?: string;
}
export interface Attendance {
id: number;
employee_id: number;
supervisor_id: number;
check_in_time: string;
check_out_time?: string;
work_date: string;
status: 'CheckedIn' | 'CheckedOut';
created_at: string;
updated_at: string;
employee_name?: string;
employee_username?: string;
supervisor_name?: string;
department_name?: string;
contractor_name?: string;
}
export interface ContractorRate {
id: number;
contractor_id: number;
rate: number;
effective_date: string;
created_at: string;
updated_at: string;
contractor_name?: string;
contractor_username?: string;
}