erp-platform/ui/src/proxy/classroom/models.ts

137 lines
2.7 KiB
TypeScript
Raw Normal View History

2025-08-26 08:59:57 +00:00
export type RoleState = 'role-selection' | 'dashboard' | 'classroom'
2025-08-26 08:39:09 +00:00
export type Role = 'teacher' | 'student' | 'observer'
export interface User {
id: string
name: string
email: string
role: Role
}
export interface ClassroomDto {
2025-08-27 13:19:08 +00:00
id?: string
2025-08-26 08:39:09 +00:00
name: string
description?: string
subject?: string
2025-08-26 08:39:09 +00:00
teacherId: string
teacherName: string
scheduledStartTime: string
actualStartTime?: string
2025-08-26 08:39:09 +00:00
endTime?: string
2025-08-27 13:19:08 +00:00
duration?: number
maxParticipants?: number
2025-08-26 08:39:09 +00:00
isActive: boolean
isScheduled: boolean
participantCount: number
canJoin: boolean
2025-08-27 15:00:22 +00:00
settingsDto?: ClassroomSettingsDto
2025-08-26 08:39:09 +00:00
}
export interface ClassroomSettingsDto {
allowHandRaise: boolean
allowStudentChat: boolean
allowPrivateMessages: boolean
allowStudentScreenShare: boolean
2025-08-26 08:39:09 +00:00
defaultMicrophoneState: 'muted' | 'unmuted'
defaultCameraState: 'on' | 'off'
defaultLayout: string
autoMuteNewParticipants: boolean
}
export interface ClassAttendanceDto {
id: string
sessionId: string
studentId: string
studentName: string
joinTime: string
leaveTime?: string
totalDurationMinutes: number
}
export type MediaType = 'audio' | 'video' | 'screen'
export interface SignalingMessageDto {
type: MediaType
fromUserId: string
toUserId: string
data: any
}
export interface ClassParticipantDto {
id: string
name: string
isTeacher: boolean
isObserver?: boolean
isAudioMuted?: boolean
isVideoMuted?: boolean
stream?: MediaStream
screenStream?: MediaStream
isScreenSharing?: boolean
peerConnection?: RTCPeerConnection
}
export type messageType = 'public' | 'private' | 'announcement'
export interface ClassChatDto {
id: string
senderId: string
senderName: string
message: string
timestamp: string
isTeacher: boolean
recipientId?: string // Özel mesaj için
recipientName?: string
messageType: messageType
}
export type VideoLayoutType = 'grid' | 'sidebar' | 'teacher-focus'
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
canJoin: boolean
}
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
}