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

@JsonSerializable()
class ServiceInProgressEntity {
	late int count = 0;
	late int page = 0;
	late int limit = 0;
	@JSONField(name: "count_page")
	late int countPage = 0;
	late List<ServiceInProgressList> list = [];

	ServiceInProgressEntity();

	factory ServiceInProgressEntity.fromJson(Map<String, dynamic> json) => $ServiceInProgressEntityFromJson(json);

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

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

@JsonSerializable()
class ServiceInProgressList {
	late int id = 0;
	late String sn = '';
	@JSONField(name: "user_notes")
	late String userNotes = '';
	@JSONField(name: "merchant_notes")
	late String merchantNotes = '';
	@JSONField(name: "order_status")
	late String orderStatus = '';
	late ServiceInProgressListService service;
	late ServiceInProgressListMerchant merchant;
	late String staff = '';

	ServiceInProgressList();

	factory ServiceInProgressList.fromJson(Map<String, dynamic> json) => $ServiceInProgressListFromJson(json);

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

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

@JsonSerializable()
class ServiceInProgressListService {
	late int id = 0;
	late String name = '';

	ServiceInProgressListService();

	factory ServiceInProgressListService.fromJson(Map<String, dynamic> json) => $ServiceInProgressListServiceFromJson(json);

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

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

@JsonSerializable()
class ServiceInProgressListMerchant {
	late int id = 0;
	late String name = '';
	@JSONField(name: "contact_phone")
	late String contactPhone = '';

	ServiceInProgressListMerchant();

	factory ServiceInProgressListMerchant.fromJson(Map<String, dynamic> json) => $ServiceInProgressListMerchantFromJson(json);

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

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