package com.srs.comprehensive.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.srs.common.annotation.Excels;
import com.srs.common.core.domain.entity.SysDept;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.srs.common.annotation.Excel;
import com.srs.common.core.domain.BaseEntity;

/**
 * 班级信息
 * 对象 srs_class
 *
 * @author srs
 * @date 2023-06-27
 */
@Data
@TableName("srs_class")
public class SrsClass extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 班级id
     */
    @TableId(value = "class_id", type = IdType.AUTO)
    private Long classId;

    /**
     * 班级名称
     */
    @Excel(name = "班级名称")
    private String className;

    /**
     * 专业id
     */
//    @Excel(name = "专业id")
    private Long majorId;

    /**
     * 辅导员id
     */
    private Long teacherId;


    @Excels({
            @Excel(name = "专业名称", targetAttr = "majorName", type = Excel.Type.EXPORT),
    })
    @TableField(exist = false)
    private SrsMajors majors;

    //    @Excel(name = "年级id")
    private Long gradeId;


    @Excels({
            @Excel(name = "年级", targetAttr = "gradeName", type = Excel.Type.EXPORT),
    })
    @TableField(exist = false)
    private SrsGrade grade;
    /**
     * 院系
     */
//    @Excel(name = "学院编号")
    private Long deptId;
    @Excels({
            @Excel(name = "学院名称", targetAttr = "deptName", type = Excel.Type.EXPORT),
    })
    @TableField(exist = false)
    private SysDept dept;
    /**
     * 班级代码
     */
    @Excel(name = "班级代码")
    private String classCode;

    /**
     * 辅导员
     */
    @TableField(exist = false)
    @Excels({
            @Excel(name = "辅导员", targetAttr = "name", type = Excel.Type.EXPORT),
            @Excel(name = "辅导员工号", targetAttr = "employeeId", type = Excel.Type.EXPORT),
    })
    private CphTeacher teacher;

//    /**
//     * 辅导员
//     */
//    @TableField(exist = false)
//    @Excels({
//            @Excel(name = "辅导员工号", targetAttr = "employeeId", type = Excel.Type.EXPORT),
//    })
//    private CphTeacher employeeId;
//
//    public CphTeacher getEmployeeId() {
//        return employeeId;
//    }
//
//    public void setEmployeeId(CphTeacher employeeId) {
//        this.employeeId = employeeId;
//    }

    /**
     * 状态（0正常
     */
    @Excel(name = "状态", readConverterExp = "状态（0正常")
    private String status;

    public String getClassCode() {
        return classCode;
    }

    public void setClassCode(String classCode) {
        this.classCode = classCode;
    }

    public CphTeacher getTeacher() {
        return teacher;
    }

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

    public Long getTeacherId() {
        return teacherId;
    }

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

    public SrsMajors getMajors() {
        return majors;
    }

    public void setMajors(SrsMajors majors) {
        this.majors = majors;
    }

    public SrsGrade getGrade() {
        return grade;
    }

    public void setGrade(SrsGrade grade) {
        this.grade = grade;
    }

    public SysDept getDept() {
        return dept;
    }

    public void setDept(SysDept dept) {
        this.dept = dept;
    }

    public Long getGradeId() {
        return gradeId;
    }

    public void setGradeId(Long gradeId) {
        this.gradeId = gradeId;
    }

    public void setClassId(Long classId) {
        this.classId = classId;
    }

    public Long getClassId() {
        return classId;
    }

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

    public Long getMajorId() {
        return majorId;
    }

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

    public String getClassName() {
        return className;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("classId", getClassId())
                .append("majorId", getMajorId())
                .append("className", getClassName())
                .append("deptId", getDeptId())
                .append("status", getStatus())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
