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

@JsonSerializable()
class LabourRequestEditIndexEntity {
  @JSONField(name: "request_id")
  int requestId = 0;
  @JSONField(name: "service_type")
  int serviceType = 0;
  @JSONField(name: "job_start")
  String? jobStart;
  @JSONField(name: "job_end")
  String? jobEnd;
  @JSONField(name: "department_id")
  String? departmentId;
  @JSONField(name: "template_id")
  String? templateId;
  @JSONField(name: "need_num")
  int needNum = 0;
  @JSONField(name: "amount")
  String? amount = null;
  @JSONField(name: "template_list")
  List<LabourRequestEditIndexTemplateList> templateList = [];
  @JSONField(name: "department_list")
  List<LabourRequestEditIndexDepartmentList> departmentList = [];
  @JSONField(name: "charge_list")
  List<LabourRequestEditIndexDepartmentList> chargeList = [];

  LabourRequestEditIndexEntity();

  factory LabourRequestEditIndexEntity.fromJson(Map<String, dynamic> json) => $LabourRequestEditIndexEntityFromJson(json);

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

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

@JsonSerializable()
class LabourRequestEditIndexTemplateList {
  int? value = 0;
  String? txt = '';
  String? selected = '';

  LabourRequestEditIndexTemplateList();

  factory LabourRequestEditIndexTemplateList.fromJson(Map<String, dynamic> json) => $LabourRequestEditIndexTemplateListFromJson(json);

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

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

@JsonSerializable()
class LabourRequestEditIndexDepartmentList {
  String? value = null;
  String? txt = '';
  String? selected = '';
  String? checked = '';

  LabourRequestEditIndexDepartmentList();

  factory LabourRequestEditIndexDepartmentList.fromJson(Map<String, dynamic> json) => $LabourRequestEditIndexDepartmentListFromJson(json);

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

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