自习室优化ok

This commit is contained in:
zhutao
2025-11-28 13:31:23 +08:00
parent 4ecb0c35d6
commit 57305c5804
57 changed files with 2500 additions and 597 deletions

View File

@@ -1,41 +1,52 @@
class RoomInfoDto {
final int studyRoomId;
final int teacherId;
final int teacherRtcUid;
final String teacherWsClientId;
final int roomStatus;
final String dataType;
final String roomStartTime;
final String roomEndTime;
final String boardUuid;
RoomInfoDto({
required this.teacherBackground,
required this.teacherAvatar,
required this.roomName,
required this.startTime,
required this.teacherName,
required this.endTime,
required this.id,
required this.studyRoomId,
required this.teacherId,
required this.teacherRtcUid,
required this.teacherWsClientId,
required this.roomStatus,
required this.dataType,
required this.roomStartTime,
required this.roomEndTime,
required this.boardUuid,
});
String teacherBackground;
String teacherAvatar;
String roomName;
String startTime;
String teacherName;
String endTime;
int id;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map["study_room_id"] = studyRoomId;
map["teacher_id"] = teacherId;
map["teacher_rtc_uid"] = teacherRtcUid;
map["teacher_ws_client_id"] = teacherWsClientId;
map["room_status"] = roomStatus;
map["data_type"] = dataType;
map["room_start_time"] = roomStartTime;
map["room_end_time"] = roomEndTime;
map["whiteboard_uuid"] = boardUuid;
return map;
}
factory RoomInfoDto.fromJson(Map<dynamic, dynamic> json) =>
RoomInfoDto(
teacherBackground: json["teacher_background"],
teacherAvatar: json["teacher_avatar"],
roomName: json["room_name"],
startTime: json["start_time"],
teacherName: json["teacher_name"],
endTime: json["end_time"],
id: json["id"],
);
Map<dynamic, dynamic> toJson() =>
{
"teacher_background": teacherBackground,
"teacher_avatar": teacherAvatar,
"room_name": roomName,
"start_time": startTime,
"teacher_name": teacherName,
"end_time": endTime,
"id": id,
};
factory RoomInfoDto.fromJson(Map<String, dynamic> json) {
return RoomInfoDto(
studyRoomId: json["study_room_id"] ?? 0,
teacherId: json["teacher_id"] ?? 0,
teacherRtcUid: json["teacher_rtc_uid"] ?? 0,
teacherWsClientId: json["teacher_ws_client_id"] ?? "",
roomStatus: json["room_status"] ?? 0,
dataType: json["data_type"] ?? "",
roomStartTime: json["room_start_time"] ?? "",
roomEndTime: json["room_end_time"] ?? "",
boardUuid: json["whiteboard_uuid"] ?? "",
);
}
}