This commit is contained in:
zhutao
2025-11-21 18:21:47 +08:00
parent 9c94ee31fd
commit 5784a0a5d4
32 changed files with 734 additions and 441 deletions

View File

@@ -1,8 +1,7 @@
class RoomInfoDto {
RoomInfoDto({
required this.teacherBackground,
required this.teacherAvatar,
required this.roomName,
required this.startTime,
required this.teacherName,
@@ -11,6 +10,7 @@ class RoomInfoDto {
});
String teacherBackground;
String teacherAvatar;
String roomName;
String startTime;
String teacherName;
@@ -20,6 +20,7 @@ class RoomInfoDto {
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"],
@@ -30,6 +31,7 @@ class RoomInfoDto {
Map<dynamic, dynamic> toJson() =>
{
"teacher_background": teacherBackground,
"teacher_avatar": teacherAvatar,
"room_name": roomName,
"start_time": startTime,
"teacher_name": teacherName,

View File

@@ -1,7 +1,7 @@
class RoomTypeDto {
final int studyRoomId;
final int teacherId;
final String teacherRtcUid;
final int teacherRtcUid;
final String teacherWsClientId;
final int roomStatus;
final String dataType;
@@ -30,7 +30,7 @@ class RoomTypeDto {
return RoomTypeDto(
studyRoomId: json["study_room_id"] ?? 0,
teacherId: json["teacher_id"] ?? 0,
teacherRtcUid: json["teacher_rtc_uid"] ?? "",
teacherRtcUid: json["teacher_rtc_uid"] ?? 0,
teacherWsClientId: json["teacher_ws_client_id"] ?? "",
roomStatus: json["room_status"] ?? 0,
dataType: json["data_type"] ?? "",

View File

@@ -1,20 +1,21 @@
class RoomUserDto {
final int userId;
final String rtcUid;
final int rtcUid;
int microphoneStatus;
int cameraStatus;
int speekerStatus;
final String wsClientId;
final String userName;
final String avatar;
/// 1是学生2是老师
final int userType;
final List<String> filesList;
final String dataType;
int handup;
int handup;
int online; //0离线1在线
RoomUserDto({
RoomUserDto({
required this.userId,
required this.rtcUid,
required this.microphoneStatus,
@@ -65,4 +66,12 @@ class RoomUserDto {
"online": online,
};
}
static List<RoomUserDto> listFromJson(List<dynamic> data) =>
data.map((e) => RoomUserDto.fromJson(e)).toList();
@override
String toString() {
return 'RoomUserDto{userId: $userId, rtcUid: $rtcUid, microphoneStatus: $microphoneStatus, cameraStatus: $cameraStatus, speekerStatus: $speekerStatus, wsClientId: $wsClientId, userName: $userName, avatar: $avatar, userType: $userType, filesList: $filesList, dataType: $dataType, handup: $handup, online: $online,}';
}
}

View File

@@ -6,7 +6,7 @@ class RtcTokenDto {
required this.token,
});
String uid;
int uid;
DateTime expiresAt;
String channel;
String token;