erp-platform/ui/src/proxy/classroom/models.ts
2025-08-30 22:57:47 +03:00

135 lines
2.8 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { PagedAndSortedResultRequestDto } from '../abp'
export type RoleState = 'role-selection' | 'dashboard' | 'classroom'
export type Role = 'teacher' | 'student' | 'observer'
export type MessageType = 'public' | 'private' | 'announcement'
export type VideoLayoutType = 'grid' | 'sidebar' | 'teacher-focus'
export interface User {
id: string
name: string
email: string
role: Role
}
export interface ClassroomDto {
id: string
name: string
description?: string
subject?: string
teacherId: string
teacherName: string
scheduledStartTime: string
scheduledEndTime: string
duration?: number
actualStartTime?: string
actualEndTime?: string
maxParticipants?: number
participantCount: number
settingsDto?: ClassroomSettingsDto
}
export interface ClassroomSettingsDto {
allowHandRaise: boolean
allowStudentChat: boolean
allowPrivateMessages: boolean
allowStudentScreenShare: boolean
defaultMicrophoneState: 'muted' | 'unmuted'
defaultCameraState: 'on' | 'off'
defaultLayout: string
autoMuteNewParticipants: boolean
}
export interface ClassroomAttendanceDto {
id: string
sessionId: string
studentId: string
studentName: string
joinTime: string
leaveTime?: string
totalDurationMinutes: number
}
export interface ClassroomParticipantDto {
id: string
name: string
isTeacher: boolean
isObserver?: boolean
isAudioMuted?: boolean
isVideoMuted?: boolean
isHandRaised?: boolean
isActive?: boolean
stream?: MediaStream
screenStream?: MediaStream
isScreenSharing?: boolean
peerConnection?: RTCPeerConnection
}
export interface ClassroomChatDto {
id: string
sessionId: string
senderId: string
senderName: string
message: string
timestamp: string
isTeacher: boolean
recipientId?: string
recipientName?: string
messageType: MessageType
}
export interface VideoLayoutDto {
id: string
name: string
type: VideoLayoutType
description: string
}
export interface TeacherLayoutDto extends VideoLayoutDto {
id: 'teacher-focus'
name: 'Öğretmen Odaklı'
type: 'teacher-focus'
description: 'Öğretmen tam ekranda, öğrenciler küçük panelde'
}
export interface ScheduledClassDto {
id: string
name: string
scheduledTime: string
duration: number
}
export interface HandRaiseDto {
id: string
studentId: string
studentName: string
timestamp: string
isActive: boolean
}
export interface ClassDocumentDto {
id: string
name: string
url: string
type: string
size: number
uploadedAt: string
uploadedBy: string
isPresentation?: boolean
totalPages?: number
}
export interface ScreenShareRequestDto {
userId: string
userName: string
isActive: boolean
}
export interface ClassroomFilterInputDto extends PagedAndSortedResultRequestDto {
search: string
status: string
}