form_content_entity.g.dart 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. import 'package:domain/generated/json/base/json_convert_content.dart';
  2. import 'package:domain/entity/form_content_entity.dart';
  3. import 'dart:typed_data';
  4. FormContentEntity $FormContentEntityFromJson(Map<String, dynamic> json) {
  5. final FormContentEntity formContentEntity = FormContentEntity();
  6. final String? typeOfApplication = jsonConvert.convert<String>(json['type_of_application']);
  7. if (typeOfApplication != null) {
  8. formContentEntity.typeOfApplication = typeOfApplication;
  9. }
  10. final String? notesToRecipient = jsonConvert.convert<String>(json['notes_to_recipient']);
  11. if (notesToRecipient != null) {
  12. formContentEntity.notesToRecipient = notesToRecipient;
  13. }
  14. final String? notesToManagement = jsonConvert.convert<String>(json['notes_to_management']);
  15. if (notesToManagement != null) {
  16. formContentEntity.notesToManagement = notesToManagement;
  17. }
  18. final List<String>? attachments = (json['attachments'] as List<dynamic>?)?.map(
  19. (e) => jsonConvert.convert<String>(e) as String).toList();
  20. if (attachments != null) {
  21. formContentEntity.attachments = attachments;
  22. }
  23. final String? signature = jsonConvert.convert<String>(json['signature']);
  24. if (signature != null) {
  25. formContentEntity.signature = signature;
  26. }
  27. final dynamic signatureByteData = json['signatureByteData'];
  28. if (signatureByteData != null) {
  29. formContentEntity.signatureByteData = signatureByteData;
  30. }
  31. final String? ownershipStatus = jsonConvert.convert<String>(json['ownership_status']);
  32. if (ownershipStatus != null) {
  33. formContentEntity.ownershipStatus = ownershipStatus;
  34. }
  35. final String? vehicleNumber = jsonConvert.convert<String>(json['vehicle_number']);
  36. if (vehicleNumber != null) {
  37. formContentEntity.vehicleNumber = vehicleNumber;
  38. }
  39. final String? iuNumber = jsonConvert.convert<String>(json['iu_number']);
  40. if (iuNumber != null) {
  41. formContentEntity.iuNumber = iuNumber;
  42. }
  43. final String? vehicleMakeModelColour = jsonConvert.convert<String>(json['vehicle_make_model_colour']);
  44. if (vehicleMakeModelColour != null) {
  45. formContentEntity.vehicleMakeModelColour = vehicleMakeModelColour;
  46. }
  47. final String? startDate = jsonConvert.convert<String>(json['start_date']);
  48. if (startDate != null) {
  49. formContentEntity.startDate = startDate;
  50. }
  51. final String? endDate = jsonConvert.convert<String>(json['end_date']);
  52. if (endDate != null) {
  53. formContentEntity.endDate = endDate;
  54. }
  55. final String? timeOrArrival = jsonConvert.convert<String>(json['time_or_arrival']);
  56. if (timeOrArrival != null) {
  57. formContentEntity.timeOrArrival = timeOrArrival;
  58. }
  59. final String? movingCompany = jsonConvert.convert<String>(json['moving_company']);
  60. if (movingCompany != null) {
  61. formContentEntity.movingCompany = movingCompany;
  62. }
  63. final String? personInCharge = jsonConvert.convert<String>(json['person_in_charge']);
  64. if (personInCharge != null) {
  65. formContentEntity.personInCharge = personInCharge;
  66. }
  67. final String? mobileNumber = jsonConvert.convert<String>(json['mobile_number']);
  68. if (mobileNumber != null) {
  69. formContentEntity.mobileNumber = mobileNumber;
  70. }
  71. final String? companyAddress = jsonConvert.convert<String>(json['company_address']);
  72. if (companyAddress != null) {
  73. formContentEntity.companyAddress = companyAddress;
  74. }
  75. final String? dateOfEntry = jsonConvert.convert<String>(json['date_of_entry']);
  76. if (dateOfEntry != null) {
  77. formContentEntity.dateOfEntry = dateOfEntry;
  78. }
  79. final String? guestName = jsonConvert.convert<String>(json['guest_name']);
  80. if (guestName != null) {
  81. formContentEntity.guestName = guestName;
  82. }
  83. final String? guestMobileNumber = jsonConvert.convert<String>(json['guest_mobile_number']);
  84. if (guestMobileNumber != null) {
  85. formContentEntity.guestMobileNumber = guestMobileNumber;
  86. }
  87. final String? renovationStartDate = jsonConvert.convert<String>(json['renovation_start_date']);
  88. if (renovationStartDate != null) {
  89. formContentEntity.renovationStartDate = renovationStartDate;
  90. }
  91. final String? renovationEndDate = jsonConvert.convert<String>(json['renovation_end_date']);
  92. if (renovationEndDate != null) {
  93. formContentEntity.renovationEndDate = renovationEndDate;
  94. }
  95. final String? hackingStartDate = jsonConvert.convert<String>(json['hacking_start_date']);
  96. if (hackingStartDate != null) {
  97. formContentEntity.hackingStartDate = hackingStartDate;
  98. }
  99. final String? hackingEndDate = jsonConvert.convert<String>(json['hacking_end_date']);
  100. if (hackingEndDate != null) {
  101. formContentEntity.hackingEndDate = hackingEndDate;
  102. }
  103. final String? renovationCompany = jsonConvert.convert<String>(json['renovation_company']);
  104. if (renovationCompany != null) {
  105. formContentEntity.renovationCompany = renovationCompany;
  106. }
  107. final String? listOfRenovationWorks = jsonConvert.convert<String>(json['list_of_renovation_works']);
  108. if (listOfRenovationWorks != null) {
  109. formContentEntity.listOfRenovationWorks = listOfRenovationWorks;
  110. }
  111. return formContentEntity;
  112. }
  113. Map<String, dynamic> $FormContentEntityToJson(FormContentEntity entity) {
  114. final Map<String, dynamic> data = <String, dynamic>{};
  115. data['type_of_application'] = entity.typeOfApplication;
  116. data['notes_to_recipient'] = entity.notesToRecipient;
  117. data['notes_to_management'] = entity.notesToManagement;
  118. data['attachments'] = entity.attachments;
  119. data['signature'] = entity.signature;
  120. data['signatureByteData'] = entity.signatureByteData;
  121. data['ownership_status'] = entity.ownershipStatus;
  122. data['vehicle_number'] = entity.vehicleNumber;
  123. data['iu_number'] = entity.iuNumber;
  124. data['vehicle_make_model_colour'] = entity.vehicleMakeModelColour;
  125. data['start_date'] = entity.startDate;
  126. data['end_date'] = entity.endDate;
  127. data['time_or_arrival'] = entity.timeOrArrival;
  128. data['moving_company'] = entity.movingCompany;
  129. data['person_in_charge'] = entity.personInCharge;
  130. data['mobile_number'] = entity.mobileNumber;
  131. data['company_address'] = entity.companyAddress;
  132. data['date_of_entry'] = entity.dateOfEntry;
  133. data['guest_name'] = entity.guestName;
  134. data['guest_mobile_number'] = entity.guestMobileNumber;
  135. data['renovation_start_date'] = entity.renovationStartDate;
  136. data['renovation_end_date'] = entity.renovationEndDate;
  137. data['hacking_start_date'] = entity.hackingStartDate;
  138. data['hacking_end_date'] = entity.hackingEndDate;
  139. data['renovation_company'] = entity.renovationCompany;
  140. data['list_of_renovation_works'] = entity.listOfRenovationWorks;
  141. return data;
  142. }
  143. extension FormContentEntityExtension on FormContentEntity {
  144. FormContentEntity copyWith({
  145. String? typeOfApplication,
  146. String? notesToRecipient,
  147. String? notesToManagement,
  148. List<String>? attachments,
  149. String? signature,
  150. dynamic signatureByteData,
  151. String? ownershipStatus,
  152. String? vehicleNumber,
  153. String? iuNumber,
  154. String? vehicleMakeModelColour,
  155. String? startDate,
  156. String? endDate,
  157. String? timeOrArrival,
  158. String? movingCompany,
  159. String? personInCharge,
  160. String? mobileNumber,
  161. String? companyAddress,
  162. String? dateOfEntry,
  163. String? guestName,
  164. String? guestMobileNumber,
  165. String? renovationStartDate,
  166. String? renovationEndDate,
  167. String? hackingStartDate,
  168. String? hackingEndDate,
  169. String? renovationCompany,
  170. String? listOfRenovationWorks,
  171. }) {
  172. return FormContentEntity()
  173. ..typeOfApplication = typeOfApplication ?? this.typeOfApplication
  174. ..notesToRecipient = notesToRecipient ?? this.notesToRecipient
  175. ..notesToManagement = notesToManagement ?? this.notesToManagement
  176. ..attachments = attachments ?? this.attachments
  177. ..signature = signature ?? this.signature
  178. ..signatureByteData = signatureByteData ?? this.signatureByteData
  179. ..ownershipStatus = ownershipStatus ?? this.ownershipStatus
  180. ..vehicleNumber = vehicleNumber ?? this.vehicleNumber
  181. ..iuNumber = iuNumber ?? this.iuNumber
  182. ..vehicleMakeModelColour = vehicleMakeModelColour ?? this.vehicleMakeModelColour
  183. ..startDate = startDate ?? this.startDate
  184. ..endDate = endDate ?? this.endDate
  185. ..timeOrArrival = timeOrArrival ?? this.timeOrArrival
  186. ..movingCompany = movingCompany ?? this.movingCompany
  187. ..personInCharge = personInCharge ?? this.personInCharge
  188. ..mobileNumber = mobileNumber ?? this.mobileNumber
  189. ..companyAddress = companyAddress ?? this.companyAddress
  190. ..dateOfEntry = dateOfEntry ?? this.dateOfEntry
  191. ..guestName = guestName ?? this.guestName
  192. ..guestMobileNumber = guestMobileNumber ?? this.guestMobileNumber
  193. ..renovationStartDate = renovationStartDate ?? this.renovationStartDate
  194. ..renovationEndDate = renovationEndDate ?? this.renovationEndDate
  195. ..hackingStartDate = hackingStartDate ?? this.hackingStartDate
  196. ..hackingEndDate = hackingEndDate ?? this.hackingEndDate
  197. ..renovationCompany = renovationCompany ?? this.renovationCompany
  198. ..listOfRenovationWorks = listOfRenovationWorks ?? this.listOfRenovationWorks;
  199. }
  200. }