attendance_entity.dart 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import 'package:domain/generated/json/base/json_field.dart';
  2. import 'package:domain/generated/json/attendance_entity.g.dart';
  3. import 'dart:convert';
  4. export 'package:domain/generated/json/attendance_entity.g.dart';
  5. @JsonSerializable()
  6. class AttendanceEntity {
  7. int total = 0;
  8. List<AttendanceList>? rows = [];
  9. AttendanceEntity();
  10. factory AttendanceEntity.fromJson(Map<String, dynamic> json) => $AttendanceEntityFromJson(json);
  11. Map<String, dynamic> toJson() => $AttendanceEntityToJson(this);
  12. @override
  13. String toString() {
  14. return jsonEncode(this);
  15. }
  16. }
  17. @JsonSerializable()
  18. class AttendanceList {
  19. @JSONField(name: "applied_id")
  20. int? appliedId = 0;
  21. @JSONField(name: "staff_id")
  22. int? staffId = 0;
  23. @JSONField(name: "staff_name")
  24. String? staffName = '';
  25. @JSONField(name: "job_date")
  26. String? jobDate = '';
  27. @JSONField(name: "start_time")
  28. String? startTime = '';
  29. @JSONField(name: "end_time")
  30. String? endTime = '';
  31. @JSONField(name: "check_in_id")
  32. int? checkInId = 0;
  33. @JSONField(name: "check_in_time")
  34. String? checkInTime = '';
  35. @JSONField(name: "check_in_img")
  36. String? checkInImg = '';
  37. @JSONField(name: "check_out_id")
  38. int? checkOutId = 0;
  39. @JSONField(name: "check_out_time")
  40. String? checkOutTime = '';
  41. @JSONField(name: "check_out_img")
  42. String? checkOutImg = '';
  43. int? status = 0;
  44. @JSONField(name: "status_show")
  45. String? statusShow = '';
  46. bool isExpended = false; //是否展开了
  47. AttendanceList();
  48. factory AttendanceList.fromJson(Map<String, dynamic> json) => $AttendanceListFromJson(json);
  49. Map<String, dynamic> toJson() => $AttendanceListToJson(this);
  50. @override
  51. String toString() {
  52. return jsonEncode(this);
  53. }
  54. }