package com.xinyilu.system.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xinyilu.common.annotation.Excel;
import com.xinyilu.common.custominterface.Insert;
import com.xinyilu.common.custominterface.Update;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * @author wanghao
 * @create 2022/9/23 0023
 */
@Data
public class StudentInforImportlVO implements Serializable {
    private static final long serialVersionUID = 4869954311273158264L;

    /**
     * 主键id
     */
    @NotNull(message = "主键id不能位空", groups = {Update.class})
    private Long id;

    /**
     * 幼儿园表id
     */
    private Long kindergartenId;

    /**
     * 班级表id
     */
    private Long classId;

    /**
     * 民族所属字典表id
     */
    private Long nationDictId;

    /**
     * 民族所属字典表id
     */

    @Excel(name = "民族")
    private String nationName;

    /**
     * 学生姓名表
     */
    @Excel(name = "学生姓名")
    private String studentName;

    /**
     * 学生性别，MALE：男，女：FEMALE
     */
    @Excel(name = "学生性别:男MALE女FAMELE")
    private String studentSex;

    /**
     * 学生编号
     */
    @Excel(name = "学生编号")
    private String studentNumber;

    /**
     * 出生日期
     */
    @ApiModelProperty(value = "出生日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "出生日期", dateFormat = "yyyy-MM-dd")
    private Date birthDate;

    /**
     * 身份证号
     */
    @Excel(name = "身份证号")
    private String cardNumber;

    /**
     * 曾用名
     */
    @Excel(name = "曾用名")
    private String onceName;

    /**
     * 家庭住址
     */
    @Excel(name = "家庭住址")
    private String homeAddress;

    /**
     * 是否删除，0：否，1：是
     */
    private Integer delFlag;

    /**
     * 用户表id
     */
    private Long userId;

    /**
     * 创建者
     */
    private String createBy;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 更新者
     */
    private String updateBy;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        StudentInforImportlVO that = (StudentInforImportlVO) o;
        return Objects.equals(studentName, that.studentName) && Objects.equals(studentNumber, that.studentNumber);
    }

    @Override
    public int hashCode() {
        return Objects.hash(studentName, studentNumber);
    }
}
