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

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

	StaffReviewHistorySGEntity();

	factory StaffReviewHistorySGEntity.fromJson(Map<String, dynamic> json) => $StaffReviewHistorySGEntityFromJson(json);

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

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

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

	StaffReviewHistorySGReviews();

	factory StaffReviewHistorySGReviews.fromJson(Map<String, dynamic> json) => $StaffReviewHistorySGReviewsFromJson(json);

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

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