package com.ruoyi.course.domain.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
@ApiModel(description = "排课结果")
public class ScheduleResult {

    @ApiModelProperty(value = "是否成功")
    private boolean success;
    
    @ApiModelProperty(value = "消息")
    private String message;
    
    @ApiModelProperty(value = "排课统计")
    private Statistics statistics;
    
    @ApiModelProperty(value = "冲突列表")
    private List<ConflictInfo> conflicts;
    
    @ApiModelProperty(value = "未安排的课程")
    private List<UnassignedCourse> unassignedCourses;
    
    @Data
    public static class Statistics {
        @ApiModelProperty(value = "总课程数")
        private Integer totalCourses;
        
        @ApiModelProperty(value = "已安排课程数")
        private Integer scheduledCourses;
        
        @ApiModelProperty(value = "教师总数")
        private Integer totalTeachers;
        
        @ApiModelProperty(value = "教室总数")
        private Integer totalClassrooms;
        
        @ApiModelProperty(value = "学生总数")
        private Integer totalStudents;
        
        @ApiModelProperty(value = "排课耗时(毫秒)")
        private Integer scheduleTime;
    }
    
    @Data
    public static class ConflictInfo {
        @ApiModelProperty(value = "冲突类型")
        private String type;
        
        @ApiModelProperty(value = "描述")
        private String description;
        
        @ApiModelProperty(value = "涉及的项目")
        private List<String> involvedItems;
    }
    
    @Data
    public static class UnassignedCourse {
        @ApiModelProperty(value = "课程ID")
        private Long courseId;
        
        @ApiModelProperty(value = "课程名称")
        private String courseName;
        
        @ApiModelProperty(value = "未安排原因")
        private String reason;
    }
}