package com.cs102.attendance.dto; import java.util.List; public class MainViewDto { private List todaySessions; private List studentRoster; private int totalStudents; private int totalSessions; // Constructors public MainViewDto() {} public MainViewDto(List todaySessions, List studentRoster) { this.todaySessions = todaySessions; this.studentRoster = studentRoster; this.totalStudents = studentRoster != null ? studentRoster.size() : 0; this.totalSessions = todaySessions != null ? todaySessions.size() : 0; } // Getters and Setters public List getTodaySessions() { return todaySessions; } public void setTodaySessions(List todaySessions) { this.todaySessions = todaySessions; this.totalSessions = todaySessions != null ? todaySessions.size() : 0; } public List getStudentRoster() { return studentRoster; } public void setStudentRoster(List studentRoster) { this.studentRoster = studentRoster; this.totalStudents = studentRoster != null ? studentRoster.size() : 0; } public int getTotalStudents() { return totalStudents; } public void setTotalStudents(int totalStudents) { this.totalStudents = totalStudents; } public int getTotalSessions() { return totalSessions; } public void setTotalSessions(int totalSessions) { this.totalSessions = totalSessions; } }