package com.qmth.paper.library.common.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.boot.tools.excel.annotation.ExcelColumn;
import com.qmth.paper.library.common.base.BaseEntity;
import com.qmth.paper.library.common.contant.SystemConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * 考生对象
 * </p>
 */
@ApiModel(value = "ExamStudent对象", description = "考生对象")
public class ExamStudent extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "学校ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long schoolId;

    @ApiModelProperty(value = "学期ID")
    @JsonSerialize(using = ToStringSerializer.class)
    @NotNull(message = "请选择学期")
    private Long semesterId;

    @ApiModelProperty(value = "考试ID")
    @JsonSerialize(using = ToStringSerializer.class)
    @NotNull(message = "请选择考试")
    private Long examId;

    @ApiModelProperty(value = "课程代码")
    @NotBlank(message = "课程代码必填")
    @ExcelColumn(name = "课程代码", index = 2, nullable = true)
    private String courseCode;

    @ApiModelProperty(value = "课程名称")
    @NotBlank(message = "课程名称必填")
    @ExcelColumn(name = "课程名称", index = 3, nullable = true)
    private String courseName;

    @ApiModelProperty(value = "学生姓名")
    @NotBlank(message = "学生姓名必填")
    @ExcelColumn(name = "姓名", index = 0, nullable = true)
    private String studentName;

    @ApiModelProperty(value = "学号")
    @NotBlank(message = "学号必填")
    @ExcelColumn(name = "学号", index = 1, nullable = true)
    private String studentCode;

    @ApiModelProperty(value = "学院名称")
    @ExcelColumn(name = "学院", index = 4, nullable = true)
    private String collegeName;

    @ApiModelProperty(value = "专业名称")
    @ExcelColumn(name = "专业", index = 5, nullable = true)
    private String majorName;

    @ApiModelProperty(value = "班级名称")
    @ExcelColumn(name = "班级", index = 6, nullable = true)
    private String className;

    @ApiModelProperty(value = "任课老师")
    @ExcelColumn(name = "任课老师", index = 7, nullable = true)
    private String teacher;

    @ApiModelProperty(value = "教学班")
    @ExcelColumn(name = "教学班", index = 8, nullable = true)
    private String teachClass;

    @ApiModelProperty(value = "考场")
    @ExcelColumn(name = "考场", index = 9, nullable = true)
    private String examRoom;

    @ApiModelProperty(value = "成绩")
    @ExcelColumn(name = "成绩", index = 10, nullable = true)
    private Double score;

    @ApiModelProperty(value = "备注")
    @ExcelColumn(name = "备注", index = 11, nullable = true)
    private String remark;

    @ApiModelProperty(value = "扩展字段")
    private String extendFields;
    @ApiModelProperty(value = "是否绑定时自动创建：0-导入或者新建，1-绑定时自动创建")
    private Boolean source;

    @ApiModelProperty(value = "绑定图片数量（张）")
    private Integer bindCount;

    @ApiModelProperty(value = "可用状态（1：可用，0：不可用）")
    private Boolean enable;

    @ApiModelProperty(value = "生成pdf的文件路径")
    private String filePath;

    @TableField(exist = false)
    @ApiModelProperty(value = "导入文件中数据错误信息")
    private String errorMsg;

    public ExamStudent() {
    }

    public ExamStudent(Long schoolId, Long semesterId, Long examId, String courseCode, String courseName, String studentName, String studentCode, Boolean source, Boolean enable) {
        setId(SystemConstant.getDbUuid());
        this.schoolId = schoolId;
        this.semesterId = semesterId;
        this.examId = examId;
        this.courseCode = courseCode;
        this.courseName = courseName;
        this.studentName = studentName;
        this.studentCode = studentCode;
        this.source = source;
        this.enable = enable;
        this.bindCount = 0;
    }

    public Long getSchoolId() {
        return schoolId;
    }

    public void setSchoolId(Long schoolId) {
        this.schoolId = schoolId;
    }

    public Long getSemesterId() {
        return semesterId;
    }

    public void setSemesterId(Long semesterId) {
        this.semesterId = semesterId;
    }

    public Long getExamId() {
        return examId;
    }

    public void setExamId(Long examId) {
        this.examId = examId;
    }

    public String getCourseCode() {
        return courseCode;
    }

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

    public String getCourseName() {
        return courseName;
    }

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

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    public String getStudentCode() {
        return studentCode;
    }

    public void setStudentCode(String studentCode) {
        this.studentCode = studentCode;
    }

    public String getCollegeName() {
        return collegeName;
    }

    public void setCollegeName(String collegeName) {
        this.collegeName = collegeName;
    }

    public String getMajorName() {
        return majorName;
    }

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

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getTeacher() {
        return teacher;
    }

    public void setTeacher(String teacher) {
        this.teacher = teacher;
    }

    public String getTeachClass() {
        return teachClass;
    }

    public void setTeachClass(String teachClass) {
        this.teachClass = teachClass;
    }

    public String getExamRoom() {
        return examRoom;
    }

    public void setExamRoom(String examRoom) {
        this.examRoom = examRoom;
    }

    public Double getScore() {
        return score;
    }

    public void setScore(Double score) {
        this.score = score;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getExtendFields() {
        return extendFields;
    }

    public void setExtendFields(String extendFields) {
        this.extendFields = extendFields;
    }

    public Boolean getSource() {
        return source;
    }

    public void setSource(Boolean source) {
        this.source = source;
    }

    public Integer getBindCount() {
        return bindCount;
    }

    public void setBindCount(Integer bindCount) {
        this.bindCount = bindCount;
    }

    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }
}
