package com.crm.rely.backend.core.entity.user.info;

import com.crm.rely.backend.core.constant.Constants;
import com.crm.rely.backend.core.entity.login.BaseLoginEntity;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @program: crm-backend
 * @description:
 * @author: houn
 * @create: 2019-07-25 16:06
 */
@Data
public class UserLoginEntity extends BaseLoginEntity {

    @NotNull(message = Constants.USERNAME_NOT_NULL_ERROR)
    @NotBlank(message = Constants.USERNAME_NOT_NULL_ERROR)
    private String loginName;

    @NotNull(message = Constants.PASSWORD_NOT_NULL_ERROR)
    @NotBlank(message = Constants.PASSWORD_NOT_NULL_ERROR)
    private String password;

    private String ip;

    private String address;

    private Date time;

    private String emailCode;
    /**
     * google authenticator code
     */
    private Integer gaCode;

}
