package com.srs.comprehensive.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

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.fasterxml.jackson.annotation.JsonFormat;
import com.srs.common.annotation.Excels;
import com.srs.common.annotation.NotNull;
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_student
 *
 * @author srs
 * @date 2023-06-27
 */
@Data
@TableName("srs_student")
public class SrsStudent extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    @TableField("bank_addr")
    public String bankAddr;


    @TableField(exist = false)
    public String tNo;

    /** 银行卡 */
    @TableField("xhk")
    @NotNull("银行卡")
    public String xhk;

    /** 学生id */
    @TableId(value = "stu_id",type = IdType.AUTO)
    private Long stuId;

    /** 学号 */
    @Excel(name = "学号")
    private String stuNo;
    /** 姓名 */
    @Excel(name = "姓名")
    private String name;

    /** 性别 */
    @Excel(name = "性别")
    private String gender;
    /** 生日 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生日", width = 30, dateFormat = "yyyy-MM-dd")
    @NotNull("生日")
    private Date birthday;
    /** 身份证号码 */
    @Excel(name = "身份证号码")
//    @NotNull("身份证号码")
    private String idCard;

    /** 学院id */
    @TableField(exist = false)
    private Long deptId;
    @TableField(exist = false)
    private  CphTeacher cphTeacher;
    @TableField(exist = false)
    private  String cphName;
    @TableField(exist = false)
    private  Long teacherId;
    @Excels({
            @Excel(name = "学院名称", targetAttr = "deptName", type = Excel.Type.EXPORT),
    })
    @TableField(exist = false)
    private SysDept dept;
    @TableField(exist = false)
    private  String deptName;
    @Excel(name = "年级")
    @TableField(exist = false)
    private  String gradeName;
    /** 专业id */
    @TableField(exist = false)
    private Long majorId;
    @Excels({
            @Excel(name = "专业名称", targetAttr = "majorName", type = Excel.Type.EXPORT),
    })
    @TableField(exist = false)
    private SrsMajors srsMajors;
    @TableField(exist = false)
    private CphStuExtraInfo cphStuExtraInfo;
    /** 所属班级ID */

    private Long classId;

    @Excel(name = "班级代码")
    private String classCode;
    @Excels({
            @Excel(name = "班级名称", targetAttr = "className", type = Excel.Type.EXPORT),
    })
    @TableField(exist = false)
    private SrsClass srsClass;
    /** 手机号码 */
    @Excel(name = "手机号码")
    @NotNull("手机号码")
    private String phone;

    /** 家庭地址 */
    @Excel(name = "家庭地址")
    @TableField(exist = false)
//    @NotNull("家庭地址")
    private String address;
    @TableField(exist = false)
    private  String stuYearName;
    @TableField(exist = false)
    private  String needMoney;

    /** 状态（0正常 */
    @Excel(name = "状态",
            readConverterExp = "状态：01-在校；02-离校变更；03-毕业；04-外出实训；05-外出实习",type =Excel.Type.IMPORT )
    private String status;
    @Excel(name="状态",dictType = "srs_stu_status",type = Excel.Type.EXPORT)
    @TableField(exist = false)
    private  String status2;
    @TableField(exist = false)
    private Long gradeId;
    /** 删除标志（0代表存在 */
    private String delFlag;
    /**宿舍id */
    @TableField(exist = false)
    private Long roomId;

    /** 查询用成绩范围From */
    @TableField(exist = false)
    private BigDecimal testScoreFrom;

    /** 查询用成绩范围To */
    @TableField(exist = false)
    private BigDecimal testScoreTo;

    @TableField(exist = false)
    private List<SrsFemilyMenber> srsFemilyMenberList;


    public List<SrsFemilyMenber> getSrsFemilyMenberList() {
        return srsFemilyMenberList;
    }


    public void setSrsFemilyMenberList(List<SrsFemilyMenber> srsFemilyMenberList) {
        this.srsFemilyMenberList = srsFemilyMenberList;
    }

//    public SrsStudent(List<SrsFemilyMenber> srsFemilyMenberList) {
//        this.srsFemilyMenberList = srsFemilyMenberList;
//    }

    public BigDecimal getTestScoreFrom() {
        return testScoreFrom;
    }

    public void setTestScoreFrom(BigDecimal testScoreFrom) {
        this.testScoreFrom = testScoreFrom;
    }

    public BigDecimal getTestScoreTo() {
        return testScoreTo;
    }

    public void setTestScoreTo(BigDecimal testScoreTo) {
        this.testScoreTo = testScoreTo;
    }

    public Long getRoomId() {
        return roomId;
    }

    public void setRoomId(Long roomId) {
        this.roomId = roomId;
    }



    public String getClassCode() {
        return classCode;
    }

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

    public void setStuId(Long stuId)
    {
        this.stuId = stuId;
    }

    public Long getStuId()
    {
        return stuId;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setGender(String gender)
    {
        this.gender = gender;
    }

    public String getGender()
    {
        return gender;
    }
    public void setBirthday(Date birthday)
    {
        this.birthday = birthday;
    }

    public Date getBirthday()
    {
        return birthday;
    }
    public void setIdCard(String idCard)
    {
        this.idCard = idCard;
    }

    public String getIdCard()
    {
        return idCard;
    }
    public void setDeptId(Long deptId)
    {
        this.deptId = deptId;
    }

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

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

    public Long getClassId()
    {
        return classId;
    }
    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public String getPhone()
    {
        return phone;
    }
    public void setAddress(String address)
    {
        this.address = address;
    }

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

    public String getStatus()
    {
        return status;
    }
    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag()
    {
        return delFlag;
    }
    public String getStuNo() {
        return stuNo;
    }

    public SrsClass getSrsClass() {
        return srsClass;
    }

    public void setSrsClass(SrsClass srsClass) {
        this.srsClass = srsClass;
    }

    public SrsMajors getSrsMajors() {
        return srsMajors;
    }

    public void setSrsMajors(SrsMajors srsMajors) {
        this.srsMajors = srsMajors;
    }

    public SysDept getDept() {
        return dept;
    }

    public void setDept(SysDept dept) {
        this.dept = dept;
    }
    public void setStuNo(String stuNo) {
        this.stuNo = stuNo;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("stuId", getStuId())
             .append("stuNo", getStuNo())
            .append("name", getName())
            .append("gender", getGender())
            .append("birthday", getBirthday())
            .append("idCard", getIdCard())
            .append("deptId", getDeptId())
            .append("majorId", getMajorId())
            .append("classId", getClassId())
            .append("phone", getPhone())
            .append("address", getAddress())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
