package com.magistr.app.service;

import com.magistr.app.dto.ScheduleRuleDto;

import java.util.List;

public class ScheduleRuleConflictException extends RuntimeException {

    private final ScheduleRuleDto conflictRule;
    private final List<String> conflictFields;
    private final List<String> conflictReasons;

    public ScheduleRuleConflictException(String message,
                                         ScheduleRuleDto conflictRule,
                                         List<String> conflictFields,
                                         List<String> conflictReasons) {
        super(message);
        this.conflictRule = conflictRule;
        this.conflictFields = List.copyOf(conflictFields);
        this.conflictReasons = List.copyOf(conflictReasons);
    }

    public ScheduleRuleDto getConflictRule() {
        return conflictRule;
    }

    public List<String> getConflictFields() {
        return conflictFields;
    }

    public List<String> getConflictReasons() {
        return conflictReasons;
    }
}
