import 'package:domain/generated/json/base/json_field.dart';
import 'package:domain/generated/json/u_k_attendance_entity.g.dart';
import 'dart:convert';
export 'package:domain/generated/json/u_k_attendance_entity.g.dart';

@JsonSerializable()
class UKAttendanceEntity {
	int total = 0;
	List<UKAttendanceRows> rows = [];

	UKAttendanceEntity();

	factory UKAttendanceEntity.fromJson(Map<String, dynamic> json) => $UKAttendanceEntityFromJson(json);

	Map<String, dynamic> toJson() => $UKAttendanceEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class UKAttendanceRows {
	String? id;
	@JSONField(name: "member_id")
	String? memberId;
	@JSONField(name: "staff_name")
	String? staffName;
	String? phone;
	@JSONField(name: "job_title")
	String? jobTitle;
	@JSONField(name: "department_name")
	String? departmentName;
	@JSONField(name: "job_date")
	String? jobDate;
	@JSONField(name: "start_time")
	String? startTime;
	@JSONField(name: "end_time")
	String? endTime;
	@JSONField(name: "applied_at")
	String? appliedAt;
	@JSONField(name: "adjust_show")
	String? adjustShow;
	@JSONField(name: "total_hours")
	String? totalHours;
	int status = 0;
	@JSONField(name: "status_show")
	String? statusShow;
	@JSONField(name: "security_in")
	UKAttendanceInOut? securityIn;
	@JSONField(name: "security_out")
	UKAttendanceInOut? securityOut;
	@JSONField(name: "work_in")
	UKAttendanceInOut? workIn;
	@JSONField(name: "work_out")
	UKAttendanceInOut? workOut;
	@JSONField(name: "s_in")
	int? sIn;
	@JSONField(name: "s_out")
	int? sOut;
	@JSONField(name: "w_in")
	int? wIn;
	@JSONField(name: "w_out")
	int? wOut;
	@JSONField(name: "revise_hours")
	String? reviseHours;
	String? gratuity;

	UKAttendanceRows();

	factory UKAttendanceRows.fromJson(Map<String, dynamic> json) => $UKAttendanceRowsFromJson(json);

	Map<String, dynamic> toJson() => $UKAttendanceRowsToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class UKAttendanceInOut {
	String? time;
	String? image;
	int? changed;

	UKAttendanceInOut();

	factory UKAttendanceInOut.fromJson(Map<String, dynamic> json) => $UKAttendanceInOutFromJson(json);

	Map<String, dynamic> toJson() => $UKAttendanceInOutToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}
