Files
xueguang_flutter_app/lib/request/dto/room/room_info_dto.dart
2025-11-28 13:31:23 +08:00

53 lines
1.5 KiB
Dart

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.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,
});
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<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"] ?? "",
);
}
}