class RoomListItemDto {
  RoomListItemDto({
    required this.teacherGrade,
    required this.roomName,
    required this.startTime,
    required this.teacherName,
    required this.teacherAvatar,
    required this.endTime,
    required this.teacherSchoolName,
    required this.teacherIntroduction,
    required this.id,
    required this.teacherMajor,
  });

  String teacherGrade;
  String roomName;
  String startTime;
  String teacherName;
  String teacherAvatar;
  String endTime;
  String teacherSchoolName;
  String teacherIntroduction;
  int id;
  String teacherMajor;

  factory RoomListItemDto.fromJson(Map<dynamic, dynamic> json) => RoomListItemDto(
    teacherGrade: json["teacher_grade"],
    roomName: json["room_name"],
    startTime: json["start_time"],
    teacherName: json["teacher_name"],
    teacherAvatar: json["teacher_avatar"],
    endTime: json["end_time"],
    teacherSchoolName: json["teacher_school_name"],
    teacherIntroduction: json["teacher_introduction"],
    id: json["id"],
    teacherMajor: json["teacher_major"],
  );

  Map<dynamic, dynamic> toJson() => {
    "teacher_grade": teacherGrade,
    "room_name": roomName,
    "start_time": startTime,
    "teacher_name": teacherName,
    "teacher_avatar": teacherAvatar,
    "end_time": endTime,
    "teacher_school_name": teacherSchoolName,
    "teacher_introduction": teacherIntroduction,
    "id": id,
    "teacher_major": teacherMajor,
  };
}
