data/model/ package and use Kotlin data classes for automatic equals, hashCode, and copy implementations.
Student Model
Represents a student enrolled in the TecNM institution.Student.kt
Fields
Unique identifier for the student in the database
Student’s control number (matrícula) - unique identifier assigned by TecNM. Format:
226W0487Full name of the student
Academic program the student is enrolled in (e.g., “Ingeniería en Sistemas Computacionales”)
Current semester number (1-12 typically)
Overall GPA/average grade (0.0-100.0 scale)
Usage Example
ClassSession Model
Represents a single class session in a student’s schedule.ClassSession.kt
Fields
Unique identifier for the class session
Name of the course/subject (e.g., “Programación Orientada a Objetos”)
Name of the professor teaching the class
Location where the class takes place (e.g., “Lab 3”, “Aula A2”)
Day of the week the class occurs (e.g., “Martes”)
Class start time in 24-hour format (e.g., “10:00”)
Class end time in 24-hour format (e.g., “12:00”)
Flag indicating if this is the currently active class session
Usage Example
Building Model
Represents a building or location on the campus.Building.kt
Fields
Unique identifier for the building
Name of the building (e.g., “Edificio A”, “Laboratorio 3”)
Brief description of the building’s purpose (e.g., “Aulas generales”)
Type or category of building (e.g., “Aulas”, “Labs”, “Cafetería”)
Distance from current location as a formatted string (e.g., “120 m”)
Usage Example
FakeData Provider
For development and testing, the app usesFakeData.kt to provide mock data instances:
FakeData.kt
Usage in Screens
Screens import and use FakeData directly:Best Practices
Why Data Classes?
Why Data Classes?
Kotlin data classes automatically generate
equals(), hashCode(), toString(), and copy() methods, reducing boilerplate code and ensuring consistency.Why Immutable Models?
Why Immutable Models?
Using
val for all properties makes models immutable, which is essential for proper state management in Compose. Immutable data prevents accidental mutations and makes state changes explicit.Default Parameters
Default Parameters
The
isCurrent parameter in ClassSession has a default value of false, making it optional and improving API ergonomics.