class EmployeeModel {
  final int id;
  final String name;
  final String designation;
  final String checkIn;
  final String checkOut;
  final int actions;

  EmployeeModel({
    required this.id,
    required this.name,
    required this.designation,
    required this.checkIn,
    required this.checkOut,
    required this.actions,
  });

  factory EmployeeModel.fromJson(Map<String, dynamic> json) {
    return EmployeeModel(
      id: json['employeeId'] ?? 0,
      name: '${json['firstName']} ${json['lastName']}',
      designation: json['jobRoleName'] ?? '',
      checkIn: json['checkIn'] ?? '-', // Make sure your API returns this field
      checkOut: json['checkOut'] ?? '-',
      actions: json['actions'] ?? 0, // Make sure your API returns this field
    );
  }
}
