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

@JsonSerializable()
class THEmployeeRemarksEntity {
	int count = 0;
	@JSONField(name: "avg_score")
	String? avgScore;
	List<THEmployeeRemarksReviews> reviews = [];
	@JSONField(name: "member_id")
	int? memberId;
	@JSONField(name: "labourer_name")
	String? labourerName;

	THEmployeeRemarksEntity();

	factory THEmployeeRemarksEntity.fromJson(Map<String, dynamic> json) => $THEmployeeRemarksEntityFromJson(json);

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

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

@JsonSerializable()
class THEmployeeRemarksReviews {
	@JSONField(name: "employer_name")
	String? employerName;
	@JSONField(name: "attitude_rate")
	double attitudeRate = 0;
	@JSONField(name: "grooming_rate")
	double groomingRate = 0;
	@JSONField(name: "performance_rate")
	double performanceRate = 0;
	@JSONField(name: "experience_rate")
	double experienceRate = 0;
	String? feedback;
	@JSONField(name: "created_at")
	String? createdAt;

	THEmployeeRemarksReviews();

	factory THEmployeeRemarksReviews.fromJson(Map<String, dynamic> json) => $THEmployeeRemarksReviewsFromJson(json);

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

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