service_in_progress_entity.dart 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. import 'package:domain/generated/json/base/json_field.dart';
  2. import 'package:domain/generated/json/service_in_progress_entity.g.dart';
  3. import 'dart:convert';
  4. export 'package:domain/generated/json/service_in_progress_entity.g.dart';
  5. @JsonSerializable()
  6. class ServiceInProgressEntity {
  7. late int count = 0;
  8. late int page = 0;
  9. late int limit = 0;
  10. @JSONField(name: "count_page")
  11. late int countPage = 0;
  12. late List<ServiceInProgressList> list = [];
  13. ServiceInProgressEntity();
  14. factory ServiceInProgressEntity.fromJson(Map<String, dynamic> json) => $ServiceInProgressEntityFromJson(json);
  15. Map<String, dynamic> toJson() => $ServiceInProgressEntityToJson(this);
  16. @override
  17. String toString() {
  18. return jsonEncode(this);
  19. }
  20. }
  21. @JsonSerializable()
  22. class ServiceInProgressList {
  23. late int id = 0;
  24. late String sn = '';
  25. @JSONField(name: "user_notes")
  26. late String userNotes = '';
  27. @JSONField(name: "merchant_notes")
  28. late String merchantNotes = '';
  29. @JSONField(name: "order_status")
  30. late String orderStatus = '';
  31. late ServiceInProgressListService service;
  32. late ServiceInProgressListMerchant merchant;
  33. late String staff = '';
  34. ServiceInProgressList();
  35. factory ServiceInProgressList.fromJson(Map<String, dynamic> json) => $ServiceInProgressListFromJson(json);
  36. Map<String, dynamic> toJson() => $ServiceInProgressListToJson(this);
  37. @override
  38. String toString() {
  39. return jsonEncode(this);
  40. }
  41. }
  42. @JsonSerializable()
  43. class ServiceInProgressListService {
  44. late int id = 0;
  45. late String name = '';
  46. ServiceInProgressListService();
  47. factory ServiceInProgressListService.fromJson(Map<String, dynamic> json) => $ServiceInProgressListServiceFromJson(json);
  48. Map<String, dynamic> toJson() => $ServiceInProgressListServiceToJson(this);
  49. @override
  50. String toString() {
  51. return jsonEncode(this);
  52. }
  53. }
  54. @JsonSerializable()
  55. class ServiceInProgressListMerchant {
  56. late int id = 0;
  57. late String name = '';
  58. @JSONField(name: "contact_phone")
  59. late String contactPhone = '';
  60. ServiceInProgressListMerchant();
  61. factory ServiceInProgressListMerchant.fromJson(Map<String, dynamic> json) => $ServiceInProgressListMerchantFromJson(json);
  62. Map<String, dynamic> toJson() => $ServiceInProgressListMerchantToJson(this);
  63. @override
  64. String toString() {
  65. return jsonEncode(this);
  66. }
  67. }