namespace TMSDAL.DTO.TrainerDashboard { public class TrainerDashboardSummaryDTO { public int TotalUpcomingSessions { get; set; } public int TodaySessionCount { get; set; } public int TotalCompletedSessionsThisYear { get; set; } public int OverdueUnresolvedSessions { get; set; } public int TotalActiveInstances { get; set; } public int TotalEnrolledTrainees { get; set; } public int TotalCompletedTraineesThisYear { get; set; } public decimal OverallAttendanceRate { get; set; } } public class TrainerTodaySessionDTO { public int InstanceSessionId { get; set; } public int InstanceId { get; set; } public string? InstanceCode { get; set; } public string? ProgrammeTitle { get; set; } public string? SessionTitle { get; set; } public int SessionSlNo { get; set; } public int TotalSessionsInInstance { get; set; } public DateTime ScheduledDate { get; set; } public TimeSpan? StartTime { get; set; } public TimeSpan? EndTime { get; set; } public int ActualDurationMins { get; set; } public string? VenueName { get; set; } public int SessionStatus { get; set; } public byte SessionType { get; set; } public int EnrolledCount { get; set; } public int AttendedCount { get; set; } public int AttendanceRecorded { get; set; } public int TotalTopics { get; set; } public string? TrainerNotes { get; set; } } public class TrainerUpcomingSessionDTO { public int InstanceSessionId { get; set; } public int InstanceId { get; set; } public string? InstanceCode { get; set; } public string? ProgrammeTitle { get; set; } public string? SessionTitle { get; set; } public int SessionSlNo { get; set; } public int TotalSessionsInInstance { get; set; } public DateTime ScheduledDate { get; set; } public TimeSpan? StartTime { get; set; } public TimeSpan? EndTime { get; set; } public int ActualDurationMins { get; set; } public string? VenueName { get; set; } public int SessionStatus { get; set; } public byte SessionType { get; set; } public int EnrolledCount { get; set; } public int AttendedCount { get; set; } public int AttendanceRecorded { get; set; } } public class TrainerActiveInstanceDTO { public int InstanceId { get; set; } public string? InstanceCode { get; set; } public string? InstanceTitle { get; set; } public string? ProgrammeTitle { get; set; } public DateTime PlannedStartDate { get; set; } public DateTime PlannedEndDate { get; set; } public int InstanceStatus { get; set; } public int EnrolledCount { get; set; } public int MaxCapacity { get; set; } public int CompletedCount { get; set; } } public class TrainerAllSessionDTO { public int InstanceSessionId { get; set; } public int InstanceId { get; set; } public string? InstanceCode { get; set; } public string? ProgrammeTitle { get; set; } public string? SessionTitle { get; set; } public int SessionSlNo { get; set; } public int TotalSessionsInInstance { get; set; } public DateTime ScheduledDate { get; set; } public TimeSpan? StartTime { get; set; } public TimeSpan? EndTime { get; set; } public string? VenueName { get; set; } public int SessionStatus { get; set; } public byte SessionType { get; set; } public int EnrolledCount { get; set; } public int AttendedCount { get; set; } } public class TrainerSessionHistoryDTO { public int InstanceSessionId { get; set; } public int InstanceId { get; set; } public string? ProgrammeTitle { get; set; } public string? SessionTitle { get; set; } public int SessionSlNo { get; set; } public byte SessionType { get; set; } public DateTime ScheduledDate { get; set; } public TimeSpan? StartTime { get; set; } public TimeSpan? EndTime { get; set; } public int SessionStatus { get; set; } public int PresentCount { get; set; } public int AbsentCount { get; set; } public decimal AttendanceRate { get; set; } } public class TrainerAttendanceSummaryDTO { public int ProgrammeId { get; set; } public string? ProgrammeTitle { get; set; } public int TotalSessions { get; set; } public int TotalPresent { get; set; } public int TotalExpected { get; set; } public decimal AttendanceRate { get; set; } } /// /// Aggregated YTD rating scores — powers the "Rating Summary" card on the My Ratings tab. /// Sub-scores are extracted via JSON_VALUE using assumed key names (ContentQuality, DeliveryStyle, /// Relevance, TrainerEngagement). Adjust key names in QB if MEVALUATIONTEMPLATE.QUESTIONSJSON uses /// different keys — TRY_CAST ensures all-zero result rather than error on mismatch. /// // Sub-scores (ContentQuality etc.) live inside RESPONSEDATAJSON — parsed by frontend. // AvgOverallScore comes from the direct OVERALLRATING NUMERIC(3,1) column. public class TrainerRatingSummaryDTO { public int TotalEvaluationsYTD { get; set; } public decimal AvgOverallScore { get; set; } public decimal AvgContentQuality { get; set; } public decimal AvgDeliveryStyle { get; set; } public decimal AvgRelevance { get; set; } public decimal AvgTrainerEngagement { get; set; } } public class TrainerRatingResponseDTO { public int EvaluationResponseId { get; set; } public string? ProgrammeTitle { get; set; } public string? InstanceCode { get; set; } public string? ResponseJson { get; set; } public decimal OverallRating { get; set; } public DateTime? RespondedOn { get; set; } } public class TrainerFullDashboardDTO { public TrainerDashboardSummaryDTO? Summary { get; set; } public List? TodaySessions { get; set; } public List? UpcomingSessions { get; set; } public List? ActiveInstances { get; set; } public List? AllSessions { get; set; } public List? SessionHistory { get; set; } public List? AttendanceSummary { get; set; } public TrainerRatingSummaryDTO? RatingSummary { get; set; } public List? RatingResponses { get; set; } } }