package com.ruoyi.school.course.domain.resp.time;

import com.ruoyi.core.constants.SysConstant;
import lombok.Data;

/**
 * 单节排课信息
 * @author ：zhangbaoyu
 * @date ：Created in 2020/9/23 18:54
 */
@Data
public class ClaTimeCalendarItem {

    private String courseTimeId;

    private String claId;

    private String claName;

    private String courseName;

    // 日期
    private String claDate;

    // 星期
    private String weekDay;

    private String startTime;

    private String endTime;

    private String staffName;

    private int studentCount;

    /**
     * 最多预约人数
     */

    private Integer atClassCnt;


    /**
     * 最少开课人数
     */

    private Integer lessCnt;

    // 教室
    private String roomName;

    private String claColor;
    private Integer fontSize;
    private String fontColor;

    // 上课状态
    private String claTimeStatus;

    public ClaTimeCalendarItem transfer(RespClaTimeCalendar respClaTime) {
        this.courseTimeId = respClaTime.getCourseTimeId()+"";
        this.claName = respClaTime.getClaName();
        this.courseName = respClaTime.getCourseName();
        this.claDate = respClaTime.getClaDate();
        this.claId = respClaTime.getClaId();
        this.weekDay = SysConstant.WEEK_DAY_MAP.get(respClaTime.getWeekDay());
        this.startTime = respClaTime.getStartTime().substring(0,5);
        this.endTime = respClaTime.getEndTime().substring(0,5);
        this.staffName = respClaTime.getStaffName();
        this.roomName = respClaTime.getRoomName();
        this.claColor = respClaTime.getClaColor();
        this.fontSize = respClaTime.getFontSize();
        this.fontColor = respClaTime.getFontColor();
        this.claTimeStatus = respClaTime.getStatus();
        this.atClassCnt=respClaTime.getAtClassCnt();
        this.lessCnt=respClaTime.getLessCnt();
        this.studentCount=respClaTime.getStudentCount();
        return this;
    }

}
