Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
fix(reminder): EventAdapter has implementation public and remove clas…
Browse files Browse the repository at this point in the history
…s from field
  • Loading branch information
AndreaBrighi committed Jun 14, 2023
1 parent e98c574 commit 76bbdb1
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ object EventAdapter {
/**
* Lesson is a interface that represents lesson as calendar event.
*
* @property className is a name of class.
* @property subject is a name of subject.
*/
interface Lesson : CalendarEvent {
val className: String
val subject: String
}

Expand Down Expand Up @@ -71,14 +69,12 @@ object EventAdapter {
*
* @param startTime is a start time of event.
* @param endTime is a end time of event.
* @param className is a name of class.
* @param subject is a name of subject.
* @param date is a date of event.
*/
internal data class DateLessonImpl(
data class DateLessonImpl(
override val startTime: LocalTime,
override val endTime: LocalTime,
override val className: String,
override val subject: String,
override val date: LocalDate,
) : DateLesson
Expand All @@ -88,16 +84,14 @@ object EventAdapter {
*
* @param startTime is a start time of event.
* @param endTime is a end time of event.
* @param className is a name of class.
* @param subject is a name of subject.
* @param fromDate is a date from which event is done.
* @param toDate is a date to which event is done.
* @param dayOfWeek is a day of week when event is done.
*/
internal data class WeekLessonImpl(
data class WeekLessonImpl(
override val startTime: LocalTime,
override val endTime: LocalTime,
override val className: String,
override val subject: String,
override val fromDate: LocalDate,
override val toDate: LocalDate,
Expand All @@ -115,15 +109,13 @@ object EventAdapter {
is SchoolDateLesson -> DateLessonImpl(
this.startTime,
this.endTime,
this.studentsClass.name,
this.subject,
this.date,
)

is SchoolWeekLesson -> WeekLessonImpl(
this.startTime,
this.endTime,
this.studentsClass.name,
this.subject,
this.fromDate,
this.toDate,
Expand Down

0 comments on commit 76bbdb1

Please sign in to comment.