copyWithCompanion method

TeacherOfficeHour copyWithCompanion(
  1. TeacherOfficeHoursCompanion data
)

Implementation

TeacherOfficeHour copyWithCompanion(TeacherOfficeHoursCompanion data) {
  return TeacherOfficeHour(
    id: data.id.present ? data.id.value : this.id,
    teacher: data.teacher.present ? data.teacher.value : this.teacher,
    dayOfWeek: data.dayOfWeek.present ? data.dayOfWeek.value : this.dayOfWeek,
    startHour: data.startHour.present ? data.startHour.value : this.startHour,
    startMinute: data.startMinute.present
        ? data.startMinute.value
        : this.startMinute,
    endHour: data.endHour.present ? data.endHour.value : this.endHour,
    endMinute: data.endMinute.present ? data.endMinute.value : this.endMinute,
  );
}