package com.qmth.teachcloud.common.bean.params;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Set;

/**
 * @Description: 基础课程参数
 * @Author: CaoZixuan
 * @Date: 2021-08-04
 */
public class BasicCourseParams {

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "课程id（编辑时必填）")
    private Long id;

    @ApiModelProperty(value = "课程名称")
    @NotNull(message = "请输入课程名称")
    @Length(min = 1,message = "请输入课程名称")
    private String courseName;

    @ApiModelProperty(value = "课程编号（系统默认生成全校唯一，允许编辑，提交时校验）")
    @NotNull(message = "请输入课程编号")
    @Length(min = 1,message = "请输入课程编号")
    private String courseCode;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "所属教研室id")
    @NotNull(message = "请选择所属教研室")
    @Range(min = 1L, message = "请选择所属教研室")
    private Long teachingRoomId;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "授课班级集合")
    private Set<Long> clazzIdSet;

    public Long getId() {
        return id;
    }

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

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getCourseCode() {
        return courseCode;
    }

    public void setCourseCode(String courseCode) {
        this.courseCode = courseCode;
    }

    public Long getTeachingRoomId() {
        return teachingRoomId;
    }

    public void setTeachingRoomId(Long teachingRoomId) {
        this.teachingRoomId = teachingRoomId;
    }

    public Set<Long> getClazzIdSet() {
        return clazzIdSet;
    }

    public void setClazzIdSet(Set<Long> clazzIdSet) {
        this.clazzIdSet = clazzIdSet;
    }
}
