You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.4KB

  1. class RequestAttendance {
  2. List<AttendanceStudents>? students;
  3. String? type;
  4. RequestAttendance({this.students, this.type});
  5. RequestAttendance.fromJson(Map<String, dynamic> json) {
  6. if (json['students'] != null) {
  7. students = <AttendanceStudents>[];
  8. json['students'].forEach((v) {
  9. students!.add(AttendanceStudents.fromJson(v));
  10. });
  11. }
  12. type = json['type'];
  13. }
  14. Map<String, dynamic> toJson() {
  15. final data = <String, dynamic>{};
  16. if (students != null) {
  17. data['students'] = students!.map((v) => v.toJson()).toList();
  18. }
  19. data['type'] = type;
  20. return data;
  21. }
  22. }
  23. class AttendanceStudents {
  24. String? studentId;
  25. String? code;
  26. bool? status;
  27. String? description;
  28. String? parentId;
  29. String? leaveStatus;
  30. AttendanceStudents({this.studentId, this.code, this.status, this.description, this.parentId, this.leaveStatus});
  31. AttendanceStudents.fromJson(Map<String, dynamic> json) {
  32. studentId = json['student_id'];
  33. code = json['code'];
  34. status = json['status'];
  35. description = json['description'];
  36. parentId = json['parent_id'];
  37. leaveStatus = json['leave_status'];
  38. }
  39. Map<String, dynamic> toJson() {
  40. final data = <String, dynamic>{};
  41. data['student_id'] = studentId;
  42. data['code'] = code;
  43. data['status'] = status;
  44. data['description'] = description;
  45. data['leave_status'] = leaveStatus;
  46. return data;
  47. }
  48. }