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

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

	THAppliedTableEntity();

	factory THAppliedTableEntity.fromJson(Map<String, dynamic> json) => $THAppliedTableEntityFromJson(json);

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

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

@JsonSerializable()
class THAppliedTableRows {
	String? id;
	@JSONField(name: "member_id")
	String? memberId;
	String? avatar;
	@JSONField(name: "s_id")
	String? sId;
	@JSONField(name: "job_title")
	String? jobTitle;
	@JSONField(name: "outlet_name")
	String? outletName;
	@JSONField(name: "ballroom_name")
	String? ballroomName;
	@JSONField(name: "labourer_name")
	String? labourerName;
	@JSONField(name: "labourer_nric")
	String? labourerNric;
	@JSONField(name: "job_date")
	String? jobDate;
	@JSONField(name: "start_time")
	String? startTime;
	@JSONField(name: "end_time")
	String? endTime;
	@JSONField(name: "adjust_hours")
	String? adjustHours;
	@JSONField(name: "working_hours")
	String? workingHours;
	@JSONField(name: "total_hours")
	String? totalHours;
	int status = 0;
	@JSONField(name: "status_show")
	String? statusShow;
	@JSONField(name: "hourly_rate")
	String? hourlyRate;
	@JSONField(name: "remark_status")
	String? remarkStatus;
	@JSONField(name: "security_in")
	THAppliedTableCheckInOut? securityIn;
	@JSONField(name: "security_out")
	THAppliedTableCheckInOut? securityOut;
	@JSONField(name: "work_in")
	THAppliedTableCheckInOut? workIn;
	@JSONField(name: "work_out")
	THAppliedTableCheckInOut? workOut;
	@JSONField(name: "s_in")
	String? sIn;
	@JSONField(name: "s_out")
	String? sOut;
	@JSONField(name: "w_in")
	String? wIn;
	@JSONField(name: "w_out")
	String? wOut;
	@JSONField(name: "audit_reject")
	String? auditReject;
	@JSONField(name: "revise_hours")
	String? reviseHours;
	@JSONField(name: "clothing_size")
	String? clothingSize;

	bool isSelected = false;  //自定义属性,是否选中

	THAppliedTableRows();

	factory THAppliedTableRows.fromJson(Map<String, dynamic> json) => $THAppliedTableRowsFromJson(json);

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

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

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

	THAppliedTableCheckInOut();

	factory THAppliedTableCheckInOut.fromJson(Map<String, dynamic> json) => $THAppliedTableCheckInOutFromJson(json);

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

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

