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

@JsonSerializable()
class ServiceRepairDetailEntity {
  late int id = 0;
  late String name = '';
  late String description = '';
  late ServiceRepairDetailMerchant merchant;
  late ServiceRepairDetailCategory category;

  ServiceRepairDetailEntity();

  factory ServiceRepairDetailEntity.fromJson(Map<String, dynamic> json) =>
      $ServiceRepairDetailEntityFromJson(json);

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

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

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

  ServiceRepairDetailMerchant();

  factory ServiceRepairDetailMerchant.fromJson(Map<String, dynamic> json) =>
      $ServiceRepairDetailMerchantFromJson(json);

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

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

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

  ServiceRepairDetailCategory();

  factory ServiceRepairDetailCategory.fromJson(Map<String, dynamic> json) =>
      $ServiceRepairDetailCategoryFromJson(json);

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

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