labour_request_index_entity.dart 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import 'package:domain/entity/response/index_option_entity.dart';
  2. import 'package:domain/generated/json/base/json_field.dart';
  3. import 'package:domain/generated/json/labour_request_index_entity.g.dart';
  4. import 'dart:convert';
  5. export 'package:domain/generated/json/labour_request_index_entity.g.dart';
  6. @JsonSerializable()
  7. class LabourRequestIndexEntity {
  8. @JSONField(name: "department_list")
  9. List<LabourRequestIndexDepartmentList>? departmentList = [];
  10. @JSONField(name: "outlet_list")
  11. List<LabourRequestIndexDepartmentList>? outletList = [];
  12. @JSONField(name: "status_list")
  13. List<LabourRequestIndexStatusList>? statusList = [];
  14. @JSONField(name: "division_list")
  15. List<IndexOptionEntity> divisionList = [];
  16. @JSONField(name: "with_ot_job")
  17. bool withOtJob = false;
  18. @JSONField(name: "with_ot")
  19. bool withOt = false;
  20. LabourRequestIndexEntity();
  21. factory LabourRequestIndexEntity.fromJson(Map<String, dynamic> json) => $LabourRequestIndexEntityFromJson(json);
  22. Map<String, dynamic> toJson() => $LabourRequestIndexEntityToJson(this);
  23. @override
  24. String toString() {
  25. return jsonEncode(this);
  26. }
  27. }
  28. @JsonSerializable()
  29. class LabourRequestIndexDepartmentList {
  30. String? value = '';
  31. String? txt = '';
  32. String? selected = '';
  33. LabourRequestIndexDepartmentList();
  34. factory LabourRequestIndexDepartmentList.fromJson(Map<String, dynamic> json) => $LabourRequestIndexDepartmentListFromJson(json);
  35. Map<String, dynamic> toJson() => $LabourRequestIndexDepartmentListToJson(this);
  36. @override
  37. String toString() {
  38. return jsonEncode(this);
  39. }
  40. }
  41. @JsonSerializable()
  42. class LabourRequestIndexStatusList {
  43. String? value = '';
  44. String? txt = '';
  45. String? selected = '';
  46. LabourRequestIndexStatusList();
  47. factory LabourRequestIndexStatusList.fromJson(Map<String, dynamic> json) => $LabourRequestIndexStatusListFromJson(json);
  48. Map<String, dynamic> toJson() => $LabourRequestIndexStatusListToJson(this);
  49. @override
  50. String toString() {
  51. return jsonEncode(this);
  52. }
  53. }