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

136 lines
2.8 KiB
TypeScript
Raw Normal View History

2025-08-28 12:28:42 +00:00
import { PagedAndSortedResultRequestDto } from '../abp'
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 type MessageType = 'public' | 'private' | 'announcement'
export type VideoLayoutType = 'grid' | 'sidebar' | 'teacher-focus'
2025-08-26 08:39:09 +00:00
export interface User {
id: string
name: string
email: string
role: Role
}
export interface ClassroomDto {
2025-08-27 20:55:01 +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
2025-08-28 11:53:47 +00:00
scheduledEndTime: string
2025-08-27 13:19:08 +00:00
duration?: number
2025-08-28 11:53:47 +00:00
actualStartTime?: string
actualEndTime?: string
maxParticipants?: number
2025-08-26 08:39:09 +00:00
participantCount: number
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
}
2025-08-29 09:37:38 +00:00
export interface ClassroomAttendanceDto {
2025-08-26 08:39:09 +00:00
id: string
sessionId: string
studentId: string
studentName: string
joinTime: string
leaveTime?: string
totalDurationMinutes: number
}
2025-08-29 09:37:38 +00:00
export interface ClassroomParticipantDto {
2025-08-26 08:39:09 +00:00
id: string
name: string
isTeacher: boolean
isObserver?: boolean
isAudioMuted?: boolean
isVideoMuted?: boolean
isHandRaised?: boolean
2025-08-30 12:05:50 +00:00
isActive?: boolean
2025-08-26 08:39:09 +00:00
stream?: MediaStream
screenStream?: MediaStream
isScreenSharing?: boolean
peerConnection?: RTCPeerConnection
}
2025-08-29 09:37:38 +00:00
export interface ClassroomChatDto {
2025-08-26 08:39:09 +00:00
id: string
sessionId: string
2025-08-26 08:39:09 +00:00
senderId: string
senderName: string
message: string
timestamp: string
isTeacher: boolean
recipientId?: string
2025-08-26 08:39:09 +00:00
recipientName?: string
messageType: MessageType
2025-08-26 08:39:09 +00:00
}
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
}
2025-08-28 12:28:42 +00:00
export interface ClassroomFilterInputDto extends PagedAndSortedResultRequestDto {
search: string
status: string
}