attendance_review_entity.g.dart 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. import 'package:domain/generated/json/base/json_convert_content.dart';
  2. import 'package:domain/entity/response/attendance_review_entity.dart';
  3. AttendanceReviewEntity $AttendanceReviewEntityFromJson(Map<String, dynamic> json) {
  4. final AttendanceReviewEntity attendanceReviewEntity = AttendanceReviewEntity();
  5. final int? total = jsonConvert.convert<int>(json['total']);
  6. if (total != null) {
  7. attendanceReviewEntity.total = total;
  8. }
  9. final List<AttendanceReviewRows>? rows = (json['rows'] as List<dynamic>?)?.map(
  10. (e) => jsonConvert.convert<AttendanceReviewRows>(e) as AttendanceReviewRows).toList();
  11. if (rows != null) {
  12. attendanceReviewEntity.rows = rows;
  13. }
  14. return attendanceReviewEntity;
  15. }
  16. Map<String, dynamic> $AttendanceReviewEntityToJson(AttendanceReviewEntity entity) {
  17. final Map<String, dynamic> data = <String, dynamic>{};
  18. data['total'] = entity.total;
  19. data['rows'] = entity.rows.map((v) => v.toJson()).toList();
  20. return data;
  21. }
  22. extension AttendanceReviewEntityExtension on AttendanceReviewEntity {
  23. AttendanceReviewEntity copyWith({
  24. int? total,
  25. List<AttendanceReviewRows>? rows,
  26. }) {
  27. return AttendanceReviewEntity()
  28. ..total = total ?? this.total
  29. ..rows = rows ?? this.rows;
  30. }
  31. }
  32. AttendanceReviewRows $AttendanceReviewRowsFromJson(Map<String, dynamic> json) {
  33. final AttendanceReviewRows attendanceReviewRows = AttendanceReviewRows();
  34. final String? recordId = jsonConvert.convert<String>(json['record_id']);
  35. if (recordId != null) {
  36. attendanceReviewRows.recordId = recordId;
  37. }
  38. final String? orderId = jsonConvert.convert<String>(json['order_id']);
  39. if (orderId != null) {
  40. attendanceReviewRows.orderId = orderId;
  41. }
  42. final String? appliedId = jsonConvert.convert<String>(json['applied_id']);
  43. if (appliedId != null) {
  44. attendanceReviewRows.appliedId = appliedId;
  45. }
  46. final String? staffName = jsonConvert.convert<String>(json['staff_name']);
  47. if (staffName != null) {
  48. attendanceReviewRows.staffName = staffName;
  49. }
  50. final String? jobTitle = jsonConvert.convert<String>(json['job_title']);
  51. if (jobTitle != null) {
  52. attendanceReviewRows.jobTitle = jobTitle;
  53. }
  54. final String? departmentName = jsonConvert.convert<String>(json['department_name']);
  55. if (departmentName != null) {
  56. attendanceReviewRows.departmentName = departmentName;
  57. }
  58. final String? jobTime = jsonConvert.convert<String>(json['job_time']);
  59. if (jobTime != null) {
  60. attendanceReviewRows.jobTime = jobTime;
  61. }
  62. final String? statusShow = jsonConvert.convert<String>(json['status_show']);
  63. if (statusShow != null) {
  64. attendanceReviewRows.statusShow = statusShow;
  65. }
  66. final String? adjustShow = jsonConvert.convert<String>(json['adjust_show']);
  67. if (adjustShow != null) {
  68. attendanceReviewRows.adjustShow = adjustShow;
  69. }
  70. final String? totalShow = jsonConvert.convert<String>(json['total_show']);
  71. if (totalShow != null) {
  72. attendanceReviewRows.totalShow = totalShow;
  73. }
  74. final String? clockIn = jsonConvert.convert<String>(json['clock_in']);
  75. if (clockIn != null) {
  76. attendanceReviewRows.clockIn = clockIn;
  77. }
  78. final int? inClass = jsonConvert.convert<int>(json['in_class']);
  79. if (inClass != null) {
  80. attendanceReviewRows.inClass = inClass;
  81. }
  82. final String? clockOut = jsonConvert.convert<String>(json['clock_out']);
  83. if (clockOut != null) {
  84. attendanceReviewRows.clockOut = clockOut;
  85. }
  86. final int? outClass = jsonConvert.convert<int>(json['out_class']);
  87. if (outClass != null) {
  88. attendanceReviewRows.outClass = outClass;
  89. }
  90. final String? createdAt = jsonConvert.convert<String>(json['created_at']);
  91. if (createdAt != null) {
  92. attendanceReviewRows.createdAt = createdAt;
  93. }
  94. final int? hasReason = jsonConvert.convert<int>(json['has_reason']);
  95. if (hasReason != null) {
  96. attendanceReviewRows.hasReason = hasReason;
  97. }
  98. final bool? isSelected = jsonConvert.convert<bool>(json['isSelected']);
  99. if (isSelected != null) {
  100. attendanceReviewRows.isSelected = isSelected;
  101. }
  102. return attendanceReviewRows;
  103. }
  104. Map<String, dynamic> $AttendanceReviewRowsToJson(AttendanceReviewRows entity) {
  105. final Map<String, dynamic> data = <String, dynamic>{};
  106. data['record_id'] = entity.recordId;
  107. data['order_id'] = entity.orderId;
  108. data['applied_id'] = entity.appliedId;
  109. data['staff_name'] = entity.staffName;
  110. data['job_title'] = entity.jobTitle;
  111. data['department_name'] = entity.departmentName;
  112. data['job_time'] = entity.jobTime;
  113. data['status_show'] = entity.statusShow;
  114. data['adjust_show'] = entity.adjustShow;
  115. data['total_show'] = entity.totalShow;
  116. data['clock_in'] = entity.clockIn;
  117. data['in_class'] = entity.inClass;
  118. data['clock_out'] = entity.clockOut;
  119. data['out_class'] = entity.outClass;
  120. data['created_at'] = entity.createdAt;
  121. data['has_reason'] = entity.hasReason;
  122. data['isSelected'] = entity.isSelected;
  123. return data;
  124. }
  125. extension AttendanceReviewRowsExtension on AttendanceReviewRows {
  126. AttendanceReviewRows copyWith({
  127. String? recordId,
  128. String? orderId,
  129. String? appliedId,
  130. String? staffName,
  131. String? jobTitle,
  132. String? departmentName,
  133. String? jobTime,
  134. String? statusShow,
  135. String? adjustShow,
  136. String? totalShow,
  137. String? clockIn,
  138. int? inClass,
  139. String? clockOut,
  140. int? outClass,
  141. String? createdAt,
  142. int? hasReason,
  143. bool? isSelected,
  144. }) {
  145. return AttendanceReviewRows()
  146. ..recordId = recordId ?? this.recordId
  147. ..orderId = orderId ?? this.orderId
  148. ..appliedId = appliedId ?? this.appliedId
  149. ..staffName = staffName ?? this.staffName
  150. ..jobTitle = jobTitle ?? this.jobTitle
  151. ..departmentName = departmentName ?? this.departmentName
  152. ..jobTime = jobTime ?? this.jobTime
  153. ..statusShow = statusShow ?? this.statusShow
  154. ..adjustShow = adjustShow ?? this.adjustShow
  155. ..totalShow = totalShow ?? this.totalShow
  156. ..clockIn = clockIn ?? this.clockIn
  157. ..inClass = inClass ?? this.inClass
  158. ..clockOut = clockOut ?? this.clockOut
  159. ..outClass = outClass ?? this.outClass
  160. ..createdAt = createdAt ?? this.createdAt
  161. ..hasReason = hasReason ?? this.hasReason
  162. ..isSelected = isSelected ?? this.isSelected;
  163. }
  164. }