package com.yonge.cooleshow.biz.dal.dto;

import com.yonge.cooleshow.biz.dal.entity.CourseTimeEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author hgw
 * Created by 2022-03-21
 */
@ApiModel(value = "创建直播课接收类")
public class LiveCourseGroupDto implements Serializable {

    @ApiModelProperty(value = "主键")
    private Long id;

    @NotNull(message = "授课老师不能为空")
    @ApiModelProperty(value = "授课老师")
    private Long teacherId;

    @NotNull(message = "课程组名称不能为空")
    @Size(max = 50, message = "课程组名称长度不能超过50个字")
    @ApiModelProperty(value = "课程组名称")
    private String name;

    @NotNull(message = "声部不能为空")
    @ApiModelProperty(value = "声部")
    private Long subjectId;

    @NotNull(message = "单节课时长不能为空")
    @Positive(message = "单节课时长必须大于0")
    @ApiModelProperty(value = "单节课时长")
    private Integer singleCourseMinutes;

    @NotNull(message = "课程数不能为空")
    @Positive(message = "课程数必须大于0")
    @ApiModelProperty(value = "课程数")
    private Integer courseNum;

    @NotBlank(message = "课程介绍不能为空")
    @Size(max = 200, message = "课程介绍长度不能超过200个字")
    @ApiModelProperty(value = "课程介绍")
    private String courseIntroduce;

    @NotNull(message = "课程组售价不能为空")
    @ApiModelProperty(value = "课程组售价")
    private BigDecimal coursePrice;

    @NotNull(message = "课程组售卖开始日期不能为空")
    @ApiModelProperty(value = "课程组售卖开始日期")
    private Date salesStartDate;

    @NotNull(message = "第一堂课开始时间不能为空")
    @ApiModelProperty(value = "第一堂课开始时间")
    private Date startTime;

    @NotNull(message = "课程组售卖结束日期不能为空")
    @ApiModelProperty(value = "课程组售卖结束日期")
    private Date salesEndDate;

    @NotBlank(message = "直播模版不能为空")
    @ApiModelProperty(value = "直播背景图")
    private String backgroundPic;

    @NotNull(message = "最少成课人数不能为空")
    @Positive(message = "最少成课人数必须大于0")
    @ApiModelProperty(value = "最少成课人数")
    private Integer mixStudentNum;

    @ApiModelProperty(value = "课时及教学计划")
    private List<CoursePlanDto> CoursePlanList;

    @ApiModel(value = "课程详情接收类")
    public static class CoursePlanDto extends CourseTimeEntity implements Serializable {

        @NotNull(message = "课堂编号不能为空")
        @ApiModelProperty(value = "课堂编号-第几堂课")
        private Integer classNum;

        @NotBlank(message = "教学计划不能为空")
        @Size(max = 200, message = "教学计划不能超过200个字!")
        @ApiModelProperty(value = "教学计划/最多200字")
        private String plan;

        public Integer getClassNum() {
            return classNum;
        }

        public void setClassNum(Integer classNum) {
            this.classNum = classNum;
        }

        public String getPlan() {
            return plan;
        }

        public void setPlan(String plan) {
            this.plan = plan;
        }
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getTeacherId() {
        return teacherId;
    }

    public void setTeacherId(Long teacherId) {
        this.teacherId = teacherId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getSubjectId() {
        return subjectId;
    }

    public void setSubjectId(Long subjectId) {
        this.subjectId = subjectId;
    }

    public Integer getSingleCourseMinutes() {
        return singleCourseMinutes;
    }

    public void setSingleCourseMinutes(Integer singleCourseMinutes) {
        this.singleCourseMinutes = singleCourseMinutes;
    }

    public Integer getCourseNum() {
        return courseNum;
    }

    public void setCourseNum(Integer courseNum) {
        this.courseNum = courseNum;
    }

    public String getCourseIntroduce() {
        return courseIntroduce;
    }

    public void setCourseIntroduce(String courseIntroduce) {
        this.courseIntroduce = courseIntroduce;
    }

    public BigDecimal getCoursePrice() {
        return coursePrice;
    }

    public void setCoursePrice(BigDecimal coursePrice) {
        this.coursePrice = coursePrice;
    }

    public Date getSalesStartDate() {
        return salesStartDate;
    }

    public void setSalesStartDate(Date salesStartDate) {
        this.salesStartDate = salesStartDate;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getSalesEndDate() {
        return salesEndDate;
    }

    public void setSalesEndDate(Date salesEndDate) {
        this.salesEndDate = salesEndDate;
    }

    public String getBackgroundPic() {
        return backgroundPic;
    }

    public void setBackgroundPic(String backgroundPic) {
        this.backgroundPic = backgroundPic;
    }

    public Integer getMixStudentNum() {
        return mixStudentNum;
    }

    public void setMixStudentNum(Integer mixStudentNum) {
        this.mixStudentNum = mixStudentNum;
    }

    public List<CoursePlanDto> getCoursePlanList() {
        return CoursePlanList;
    }

    public void setCoursePlanList(List<CoursePlanDto> coursePlanList) {
        CoursePlanList = coursePlanList;
    }

}
