attendance_entity.dart 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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: "security_in")
  32. String? securityIn = '';
  33. @JSONField(name: "security_out")
  34. String? securityOut = '';
  35. @JSONField(name: "check_in_id")
  36. int? checkInId = 0;
  37. @JSONField(name: "check_in_time")
  38. String? checkInTime = '';
  39. @JSONField(name: "check_in_img")
  40. String? checkInImg = '';
  41. @JSONField(name: "check_out_id")
  42. int? checkOutId = 0;
  43. @JSONField(name: "check_out_time")
  44. String? checkOutTime = '';
  45. @JSONField(name: "check_out_img")
  46. String? checkOutImg = '';
  47. int? status = 0;
  48. @JSONField(name: "status_show")
  49. String? statusShow = '';
  50. bool isExpended = false; //是否展开了
  51. AttendanceList();
  52. factory AttendanceList.fromJson(Map<String, dynamic> json) => $AttendanceListFromJson(json);
  53. Map<String, dynamic> toJson() => $AttendanceListToJson(this);
  54. @override
  55. String toString() {
  56. return jsonEncode(this);
  57. }
  58. }