package com.hc.business.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;


/**
 * 用户表(User)实体类
 *
 * @author java
 * @since 2020-11-09 10:04:13
 */

@Builder
@ApiModel(value = "用户表")
public class User implements Serializable {


    private static final long serialVersionUID = 775234090220211721L;


    /**
     * 主键id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(value = "主键id")
    private Integer userId;

    /**
     * 身份证
     */
    @ApiModelProperty(value = "身份证")
    private String cardId;

    /**
     * 用户密码
     */
    @ApiModelProperty(value = "用户密码")
    private String userPassword;

    /**
     * 用户类别1234分别表示自注册用户，单位报名用户，免费用户,线下用户
     */
    @ApiModelProperty(value = "用户类别1234分别表示自注册用户，单位报名用户，免费用户,线下用户", required = true)
    private Integer userType;

    /**
     * 用户所属地区。只能看到该地区得课程
     */
    @ApiModelProperty(value = "用户所属地区。只能看到该地区得课程")
    private Integer areaId;

    /**
     * 用户昵称
     */
    @ApiModelProperty(value = "用户昵称")
    private String userNick;

    /**
     * 用户姓名
     */
    @ApiModelProperty(value = "用户姓名", required = true)
    @NotNull
    private String userName;

    /**
     * 手机号码
     */
    @ApiModelProperty(value = "手机号码", required = true)
    @NotBlank
    private String userMobile;

    /**
     * 邮箱
     */
    @ApiModelProperty(value = "邮箱",required = true)
//    @Email
    @NotNull
    private String userEmail;

    /**
     * 性别
     */
    @ApiModelProperty(value = "性别",required = true)
    @NotNull
    private String userGender;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Long createTime;

    /**
     * 生日
     */
    @ApiModelProperty(value = "生日")
    private String userBirthday;

    /**
     * 是否激活。只要登陆一次，就自动激活
     */
    @ApiModelProperty(value = "是否激活。只要登陆一次，就自动激活")
    private Byte active;

    /**
     * 用户头像
     */
    @ApiModelProperty(value = "用户头像")
    private String userLogo;

    /**
     * 用户单位
     */
    @ApiModelProperty(value = "用户单位",required = true)
    @NotNull
    private String userCompany;

    /**
     * 保留字段1
     */
    @ApiModelProperty(value = "保留字段1")
    private String userReserved1;

    /**
     * 保留字段2
     */
    @ApiModelProperty(value = "保留字段2")
    private String userReserved2;

    /**
     * 保留字段3
     */
    @ApiModelProperty(value = "保留字段3")
    private String userReserved3;

    /**
     * 保留字段4
     */
    @ApiModelProperty(value = "保留字段4")
    private String userReserved4;

    /**
     * 保留字段5
     */
    @ApiModelProperty(value = "保留字段5")
    private String userReserved5;

    public User(Integer userId, String cardId, String userPassword,
                Integer userType, Integer areaId, String userNick,
                @NotNull String userName, @NotNull String userMobile,
                @Email String userEmail, @NotNull String userGender,
                Long createTime, String userBirthday, Byte active,
                String userLogo, @NotNull String userCompany, String userReserved1,
                String userReserved2, String userReserved3,
                String userReserved4, String userReserved5) {
        this.userId = userId;
        this.cardId = cardId;
        this.userPassword = userPassword;
        this.userType = userType;
        this.areaId = areaId;
        this.userNick = userNick;
        this.userName = userName;
        this.userMobile = userMobile;
        this.userEmail = userEmail;
        this.userGender = userGender;
        this.createTime = createTime;
        this.userBirthday = userBirthday;
        this.active = active;
        this.userLogo = userLogo;
        this.userCompany = userCompany;
        this.userReserved1 = userReserved1;
        this.userReserved2 = userReserved2;
        this.userReserved3 = userReserved3;
        this.userReserved4 = userReserved4;
        this.userReserved5 = userReserved5;
    }

    public User() {
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getCardId() {
        return cardId;
    }

    public void setCardId(String cardId) {
        this.cardId = cardId;
    }

    public String getUserPassword() {
        return userPassword;
    }

    public void setUserPassword(String userPassword) {
        this.userPassword = userPassword;
    }

    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }

    public Integer getAreaId() {
        return areaId;
    }

    public void setAreaId(Integer areaId) {
        this.areaId = areaId;
    }

    public String getUserNick() {
        return userNick;
    }

    public void setUserNick(String userNick) {
        this.userNick = userNick;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserMobile() {
        return userMobile;
    }

    public void setUserMobile(String userMobile) {
        this.userMobile = userMobile;
    }

    public String getUserEmail() {
        return userEmail;
    }

    public void setUserEmail(String userEmail) {
        this.userEmail = userEmail;
    }

    public String getUserGender() {
        return userGender;
    }

    public void setUserGender(String userGender) {
        this.userGender = userGender;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public String getUserBirthday() {
        return userBirthday;
    }

    public void setUserBirthday(String userBirthday) {
        this.userBirthday = userBirthday;
    }

    public Byte getActive() {
        return active;
    }

    public void setActive(Byte active) {
        this.active = active;
    }

    public String getUserLogo() {
        return userLogo;
    }

    public void setUserLogo(String userLogo) {
        this.userLogo = userLogo;
    }

    public String getUserCompany() {
        return userCompany;
    }

    public void setUserCompany(String userCompany) {
        this.userCompany = userCompany;
    }

    public String getUserReserved1() {
        return userReserved1;
    }

    public void setUserReserved1(String userReserved1) {
        this.userReserved1 = userReserved1;
    }

    public String getUserReserved2() {
        return userReserved2;
    }

    public void setUserReserved2(String userReserved2) {
        this.userReserved2 = userReserved2;
    }

    public String getUserReserved3() {
        return userReserved3;
    }

    public void setUserReserved3(String userReserved3) {
        this.userReserved3 = userReserved3;
    }

    public String getUserReserved4() {
        return userReserved4;
    }

    public void setUserReserved4(String userReserved4) {
        this.userReserved4 = userReserved4;
    }

    public String getUserReserved5() {
        return userReserved5;
    }

    public void setUserReserved5(String userReserved5) {
        this.userReserved5 = userReserved5;
    }

    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", cardId='" + cardId + '\'' +
                ", userPassword='" + userPassword + '\'' +
                ", userType=" + userType +
                ", areaId=" + areaId +
                ", userNick='" + userNick + '\'' +
                ", userName='" + userName + '\'' +
                ", userMobile='" + userMobile + '\'' +
                ", userEmail='" + userEmail + '\'' +
                ", userGender='" + userGender + '\'' +
                ", createTime=" + createTime +
                ", userBirthday='" + userBirthday + '\'' +
                ", active=" + active +
                ", userLogo='" + userLogo + '\'' +
                ", userCompany='" + userCompany + '\'' +
                ", userReserved1='" + userReserved1 + '\'' +
                ", userReserved2='" + userReserved2 + '\'' +
                ", userReserved3='" + userReserved3 + '\'' +
                ", userReserved4='" + userReserved4 + '\'' +
                ", userReserved5='" + userReserved5 + '\'' +
                '}';
    }
}