uk_attendance_review_entity.g.dart 6.7 KB

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