|
- class RequestAttendance {
- List<AttendanceStudents>? students;
- String? type;
-
- RequestAttendance({this.students, this.type});
-
- RequestAttendance.fromJson(Map<String, dynamic> json) {
- if (json['students'] != null) {
- students = <AttendanceStudents>[];
- json['students'].forEach((v) {
- students!.add(AttendanceStudents.fromJson(v));
- });
- }
- type = json['type'];
- }
-
- Map<String, dynamic> toJson() {
- final data = <String, dynamic>{};
- if (students != null) {
- data['students'] = students!.map((v) => v.toJson()).toList();
- }
- data['type'] = type;
- return data;
- }
- }
-
- class AttendanceStudents {
- String? studentId;
- String? code;
- bool? status;
- String? description;
- String? parentId;
- String? leaveStatus;
-
- AttendanceStudents({this.studentId, this.code, this.status, this.description, this.parentId, this.leaveStatus});
-
- AttendanceStudents.fromJson(Map<String, dynamic> json) {
- studentId = json['student_id'];
- code = json['code'];
- status = json['status'];
- description = json['description'];
- parentId = json['parent_id'];
- leaveStatus = json['leave_status'];
- }
-
- Map<String, dynamic> toJson() {
- final data = <String, dynamic>{};
- data['student_id'] = studentId;
- data['code'] = code;
- data['status'] = status;
- data['description'] = description;
- data['leave_status'] = leaveStatus;
- return data;
- }
- }
|