form_content_entity.g.dart 9.0 KB

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