package com.yida.data.common.core.entity.user;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yida.data.common.core.enums.DataStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

@ApiModel("学生实体类")
@Data
public class EduStudent implements Serializable {

    private static final long serialVersionUID = 6499934536882493376L;

    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    private Long createId;


    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createDate;

    private Long updateId;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateDate;

    @TableLogic(value = "0", delval = "1")
    private Integer delFlag;

    @ApiModelProperty("学生姓名")
    private String stuName;

    @ApiModelProperty("曾用名")
    private String formerName;

    @ApiModelProperty("考生号")
    private String stuExamNumber;

    @ApiModelProperty("银行卡号")
    private String creditCardNumbers;

    @ApiModelProperty("民族")
    private String nation;

    @ApiModelProperty("QQ号")
    private String qqCode;

    @ApiModelProperty("微信号")
    private String wxCode;

    @ApiModelProperty("邮箱")
    private String email;

    @ApiModelProperty("入学年级")
    private String startGrade;

    @ApiModelProperty("政治面貌")
    private String politicsStatus;

    @ApiModelProperty("邮政编码")
    private String postalCode;

    @ApiModelProperty("籍贯")
    private String nativePlace;

    @ApiModelProperty("现住址")
    private String presentAddress;

    @ApiModelProperty("学生头像url")
    private String avatar;

    @ApiModelProperty("学生性别，0-男，1-女")
    private String stuSex;


    @ApiModelProperty("学号")
    private String stuNumber;


    @ApiModelProperty("校园卡号")
    private String stuCardNumber;

    @ApiModelProperty("学生类别，0-走读，1-住宿")
    private Integer type;

    @ApiModelProperty("身份证号")
    private String idNumber;

    @ApiModelProperty("学校id")
    private Long schoolId;

    @ApiModelProperty("校区id")
    private Long campusId;

    @ApiModelProperty("学段id")
    private Long sectionId;
    @ApiModelProperty("年级id")
    private Long gradeId;

    @ApiModelProperty("班级id")
    private Long classId;

    @ApiModelProperty("宿舍楼id")
    private Long dormId;

    @ApiModelProperty("宿舍楼名称")
    private transient String dormName;

    @ApiModelProperty("寝室id")
    private Long dormRoomId;

    @ApiModelProperty("寝室号名称")
    private transient String dormRoomName;

    @ApiModelProperty("学生当前状态,0=在校/在寝，1=离校/离寝")
    private Integer status;

    @ApiModelProperty("学籍状态：关联字典表")
    private String studentStatus;

    @ApiModelProperty("学生在寝状态,0-在寝，1-离寝")
    private Integer dormStatus;

    @ApiModelProperty("家庭类型,字典family_type类型,','分割")
    private String familyType;

    /**
     * 入学时间
     */
    @ApiModelProperty("入校时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private LocalDate startDate;

    /**
     * 离校时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDate endDate;

    private String wxId;

    /**
     * 0-未采集，1-已采集
     */
    private Integer collectType;

    /**
     * 是否修改过学号(微信id),0-未修改，1-已修改
     */
    @ApiModelProperty("是否修改过学号,0-未修改，1-已修改")
    private Integer updateWx;

    @ApiModelProperty("入住寝室时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime checkInTime;

    @ApiModelProperty("大华用户id")
    private Long dahuaId;

    @ApiModelProperty("大华用户code")
    private String dahuaCode;

    @ApiModelProperty("学校名称")
    private transient String schoolName;

    @ApiModelProperty("校区名称")
    private transient String campusName;

    @ApiModelProperty("学段名称")
    private transient String sectionName;

    @ApiModelProperty("年级名称")
    private transient String gradeName;

    @ApiModelProperty("班级名称")
    private transient String className;

    @ApiModelProperty("家长列表")
    private transient List<EduParent> parents;

    private transient Long classWxId;

    private transient String collectBasePic;

    private transient Boolean hasApply;

    /**
     * 用于智慧迎新的字段, 是否是新增的学生数据 0代表新增, 1代表更新 {@link DataStatusEnum}
     */
    private transient String isCreate;

    /**
     * 家长关系
     */
    private transient String relation;

    /**
     * 学生宿舍考勤状态（0=正常，1=晚归，2=异常晚归，3=旷宿,4=还未打卡）
     */
    private transient Integer dormAttStatus;

}