- 修改SaveStudentOrderDto中的studentLongIds字段为studentShortIds - 更新MeetingController中保存和传输的学生ID参数名称 - 重构MeetingRedisService中setStudentOrder方法参数为studentShortIds - 调整WebSocket通信中的学生ID字段名称一致性 - 在前端API调用中使用studentShortIds替代studentLongIds - 添加监控端对学生排序变更事件的处理逻辑 - 更新学生排序对话框中使用的ID映射方式
56 lines
1.6 KiB
TypeScript
56 lines
1.6 KiB
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import { IsArray, IsNotEmpty, IsString } from 'class-validator';
|
|
|
|
/**
|
|
* 黑名单用户 DTO
|
|
*/
|
|
export class BlacklistUserDto {
|
|
@ApiProperty({ description: '短 UID', example: 1001 })
|
|
shortUid?: number;
|
|
|
|
@ApiProperty({ description: '用户名称', example: '张三' })
|
|
userName?: string;
|
|
}
|
|
/**
|
|
* Token 响应数据 DTO
|
|
*/
|
|
export class TokenResponseDto {
|
|
@ApiProperty({ description: '应用 ID', example: '1234567890' })
|
|
public appid!: string;
|
|
|
|
@ApiProperty({ description: '声网 RTC 的 Token', example: '0061234567890abcdef...' })
|
|
public rtcToken!: string;
|
|
|
|
@ApiProperty({ description: '过期时间戳', example: 1704067200000 })
|
|
public expiresAt!: number;
|
|
}
|
|
|
|
/**
|
|
* 学生详细信息响应 DTO
|
|
*/
|
|
export class StudentDetailResponseDto {
|
|
@ApiProperty({ description: '学生长 ID (数据库 ID)', example: 1234567890 })
|
|
longId!: number;
|
|
|
|
@ApiProperty({ description: '学生短 ID (声网短 ID)', example: 1001 })
|
|
shortId!: number;
|
|
|
|
@ApiProperty({ description: '学生姓名', example: '张三' })
|
|
studentName!: string;
|
|
}
|
|
|
|
/**
|
|
* 保存学生排序请求 DTO
|
|
*/
|
|
export class SaveStudentOrderDto {
|
|
@ApiProperty({ description: '房间 ID', example: 'room_123' })
|
|
@IsNotEmpty({ message: 'roomId 不能为空' })
|
|
@IsString({ message: 'roomId 必须是字符串' })
|
|
roomId!: string;
|
|
|
|
@ApiProperty({ description: '学生短 ID 数组 (按排序顺序)', example: [1001, 1002, 1003] })
|
|
@IsNotEmpty({ message: 'studentShortIds 不能为空' })
|
|
@IsArray({ message: 'studentShortIds 必须是数组' })
|
|
studentShortIds!: number[];
|
|
}
|