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-11-01
 */
public class BasicMajorParams {
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "专业id（编辑时必填）")
    @DBVerify(value = "专业id（编辑时必填）")
    private Long id;

    @ApiModelProperty(value = "专业名称")
    @NotNull(message = "专业名称")
    @Length(min = 1,message = "专业名称")
    @DBVerify(value = "专业名称",required = true)
    private String majorName;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "所属学院id")
    @NotNull(message = "所属学院id")
    @Range(min = 1L, message = "所属学院id")
    @DBVerify(value = "所属学院id",required = true)
    private Long collegeId;

    public BasicMajorParams() {
    }

    public Long getId() {
        return id;
    }

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

    public String getMajorName() {
        return majorName;
    }

    public void setMajorName(String majorName) {
        this.majorName = majorName;
    }

    public Long getCollegeId() {
        return collegeId;
    }

    public void setCollegeId(Long collegeId) {
        this.collegeId = collegeId;
    }
}
