form_content_entity.dart 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. import 'dart:typed_data';
  2. import 'package:domain/generated/json/base/json_field.dart';
  3. import 'package:domain/generated/json/form_content_entity.g.dart';
  4. import 'dart:convert';
  5. export 'package:domain/generated/json/form_content_entity.g.dart';
  6. /*
  7. * 这是Form表单的入参和出参的对象,12种类型全部整合在一个对象中
  8. */
  9. @JsonSerializable()
  10. class FormContentEntity {
  11. @JSONField(name: "type_of_application")
  12. String? typeOfApplication;
  13. @JSONField(name: "notes_to_recipient")
  14. String? notesToRecipient;
  15. @JSONField(name: "notes_to_management")
  16. String? notesToManagement;
  17. List<String>? attachments;
  18. String? signature;
  19. dynamic signatureByteData = null; //签名的ByteData数据
  20. //汽车相关
  21. @JSONField(name: "ownership_status")
  22. String? ownershipStatus;
  23. @JSONField(name: "vehicle_number")
  24. String? vehicleNumber;
  25. @JSONField(name: "iu_number")
  26. String? iuNumber;
  27. @JSONField(name: "vehicle_make_model_colour")
  28. String? vehicleMakeModelColour;
  29. //搬家相关
  30. @JSONField(name: "start_date")
  31. String? startDate;
  32. @JSONField(name: "end_date")
  33. String? endDate;
  34. @JSONField(name: "time_or_arrival")
  35. String? timeOrArrival;
  36. @JSONField(name: "moving_company")
  37. String? movingCompany;
  38. @JSONField(name: "person_in_charge")
  39. String? personInCharge;
  40. @JSONField(name: "mobile_number")
  41. String? mobileNumber;
  42. @JSONField(name: "company_address")
  43. String? companyAddress;
  44. //停车过夜
  45. @JSONField(name: "date_of_entry")
  46. String? dateOfEntry;
  47. @JSONField(name: "guest_name")
  48. String? guestName;
  49. @JSONField(name: "guest_mobile_number")
  50. String? guestMobileNumber;
  51. //装修
  52. @JSONField(name: "renovation_start_date")
  53. String? renovationStartDate;
  54. @JSONField(name: "renovation_end_date")
  55. String? renovationEndDate;
  56. @JSONField(name: "hacking_start_date")
  57. String? hackingStartDate;
  58. @JSONField(name: "hacking_end_date")
  59. String? hackingEndDate;
  60. @JSONField(name: "renovation_company")
  61. String? renovationCompany;
  62. @JSONField(name: "list_of_renovation_works")
  63. String? listOfRenovationWorks;
  64. factory FormContentEntity.fromJson(Map<String, dynamic> json) => $FormContentEntityFromJson(json);
  65. Map<String, dynamic> toJson() => $FormContentEntityToJson(this);
  66. @override
  67. String toString() {
  68. return jsonEncode(this);
  69. }
  70. FormContentEntity({
  71. this.typeOfApplication,
  72. this.notesToRecipient,
  73. this.notesToManagement,
  74. this.attachments,
  75. this.signature,
  76. this.ownershipStatus,
  77. this.vehicleNumber,
  78. this.iuNumber,
  79. this.vehicleMakeModelColour,
  80. this.startDate,
  81. this.endDate,
  82. this.timeOrArrival,
  83. this.movingCompany,
  84. this.personInCharge,
  85. this.mobileNumber,
  86. this.companyAddress,
  87. this.dateOfEntry,
  88. this.guestName,
  89. this.guestMobileNumber,
  90. this.renovationStartDate,
  91. this.renovationEndDate,
  92. this.hackingStartDate,
  93. this.hackingEndDate,
  94. this.renovationCompany,
  95. this.listOfRenovationWorks,
  96. });
  97. FormContentEntity copyWith({
  98. String? typeOfApplication,
  99. String? notesToRecipient,
  100. String? notesToManagement,
  101. List<String>? attachments,
  102. String? signature,
  103. String? ownershipStatus,
  104. String? vehicleNumber,
  105. String? iuNumber,
  106. String? vehicleMakeModelColour,
  107. String? startDate,
  108. String? endDate,
  109. String? timeOrArrival,
  110. String? movingCompany,
  111. String? personInCharge,
  112. String? mobileNumber,
  113. String? companyAddress,
  114. String? dateOfEntry,
  115. String? guestName,
  116. String? guestMobileNumber,
  117. String? renovationStartDate,
  118. String? renovationEndDate,
  119. String? hackingStartDate,
  120. String? hackingEndDate,
  121. String? renovationCompany,
  122. String? listOfRenovationWorks,
  123. }) {
  124. return FormContentEntity(
  125. typeOfApplication: typeOfApplication ?? this.typeOfApplication,
  126. notesToRecipient: notesToRecipient ?? this.notesToRecipient,
  127. notesToManagement: notesToManagement ?? this.notesToManagement,
  128. attachments: attachments ?? this.attachments,
  129. signature: signature ?? this.signature,
  130. ownershipStatus: ownershipStatus ?? this.ownershipStatus,
  131. vehicleNumber: vehicleNumber ?? this.vehicleNumber,
  132. iuNumber: iuNumber ?? this.iuNumber,
  133. vehicleMakeModelColour: vehicleMakeModelColour ?? this.vehicleMakeModelColour,
  134. startDate: startDate ?? this.startDate,
  135. endDate: endDate ?? this.endDate,
  136. timeOrArrival: timeOrArrival ?? this.timeOrArrival,
  137. movingCompany: movingCompany ?? this.movingCompany,
  138. personInCharge: personInCharge ?? this.personInCharge,
  139. mobileNumber: mobileNumber ?? this.mobileNumber,
  140. companyAddress: companyAddress ?? this.companyAddress,
  141. dateOfEntry: dateOfEntry ?? this.dateOfEntry,
  142. guestName: guestName ?? this.guestName,
  143. guestMobileNumber: guestMobileNumber ?? this.guestMobileNumber,
  144. renovationStartDate: renovationStartDate ?? this.renovationStartDate,
  145. renovationEndDate: renovationEndDate ?? this.renovationEndDate,
  146. hackingStartDate: hackingStartDate ?? this.hackingStartDate,
  147. hackingEndDate: hackingEndDate ?? this.hackingEndDate,
  148. renovationCompany: renovationCompany ?? this.renovationCompany,
  149. listOfRenovationWorks: listOfRenovationWorks ?? this.listOfRenovationWorks,
  150. );
  151. }
  152. }