package com.magistr.app.dto;

import java.time.LocalDate;
import java.time.Instant;
import java.time.LocalTime;
import java.util.List;

public record ScheduleOverrideDto(
        Long id,
        Long baseRuleSlotId,
        LocalDate lessonDate,
        LocalDate targetLessonDate,
        String action,
        Long newTimeSlotId,
        Long newClassroomId,
        Long newTeacherId,
        String newLessonFormat,
        String comment,
        Long createdBy,
        Instant createdAt,
        Long semesterId,
        LocalDate semesterStartDate,
        LocalDate semesterEndDate,
        Long sourceTimeSlotId,
        Integer sourceTimeSlotOrder,
        LocalTime sourceStartTime,
        LocalTime sourceEndTime,
        Long sourceTeacherId,
        String sourceTeacherName,
        Long sourceClassroomId,
        String sourceClassroomName,
        String sourceLessonFormat,
        String subjectName,
        String lessonTypeName,
        List<String> groupNames
) {
    public ScheduleOverrideDto(
            Long id,
            Long baseRuleSlotId,
            LocalDate lessonDate,
            LocalDate targetLessonDate,
            String action,
            Long newTimeSlotId,
            Long newClassroomId,
            Long newTeacherId,
            String newLessonFormat,
            String comment,
            Long createdBy,
            Instant createdAt
    ) {
        this(
                id,
                baseRuleSlotId,
                lessonDate,
                targetLessonDate,
                action,
                newTimeSlotId,
                newClassroomId,
                newTeacherId,
                newLessonFormat,
                comment,
                createdBy,
                createdAt,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                List.of()
        );
    }

    public ScheduleOverrideDto(
            Long id,
            Long baseRuleSlotId,
            LocalDate lessonDate,
            String action,
            Long newTimeSlotId,
            Long newClassroomId,
            Long newTeacherId,
            String newLessonFormat,
            String comment,
            Long createdBy,
            Instant createdAt
    ) {
        this(
                id,
                baseRuleSlotId,
                lessonDate,
                null,
                action,
                newTimeSlotId,
                newClassroomId,
                newTeacherId,
                newLessonFormat,
                comment,
                createdBy,
                createdAt,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                List.of()
        );
    }
}
