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

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

import javax.validation.constraints.NotNull;

/**
 * @Description: 基础班级参数
 * @Author: CaoZixuan
 * @Date: 2021-08-28
 */
public class BasicClazzParams {

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "班级id（修改时必填）")
    @DBVerify(value = "班级id")
    private Long id;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "校区主键")
    @NotNull(message = "请选择校区")
    @Range(min = 1L, message = "请选择校区")
    @DBVerify(value = "校区",required = true)
    private Long campusId;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "专业id")
    @NotNull(message = "请选择专业")
    @Range(min = 1L, message = "请选择专业")
    @DBVerify(value = "专业",required = true)
    private Long majorId;

    @ApiModelProperty(value = "班级编号")
    @DBVerify(value = "班级编号")
    private String clazzCode;

    @ApiModelProperty(value = "班级名称")
    @NotNull(message = "请输入班级名称")
    @Length(min = 1,message = "请输入班级名称")
    @DBVerify(value = "班级名称",required = true)
    private String clazzName;

    public Long getId() {
        return id;
    }

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

    public Long getCampusId() {
        return campusId;
    }

    public void setCampusId(Long campusId) {
        this.campusId = campusId;
    }

    public String getClazzCode() {
        return clazzCode;
    }

    public void setClazzCode(String clazzCode) {
        this.clazzCode = clazzCode;
    }

    public String getClazzName() {
        return clazzName;
    }

    public void setClazzName(String clazzName) {
        this.clazzName = clazzName;
    }

    public Long getMajorId() {
        return majorId;
    }

    public void setMajorId(Long majorId) {
        this.majorId = majorId;
    }
}
