package com.ssm.manage.entity;


//import com.dc.common.core.BaseEntity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ssm.manage.utils.DateUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Id;

/**
 * (StaffLoginRecording)实体类
 *
 * @author makejava
 * @since 2023-12-14 15:35:23
 */
@TableName("staff_login_recording_${tab}")
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "")
@JsonIgnoreProperties(ignoreUnknown = true)
public class StaffLoginRecording implements Serializable {
    private static final long serialVersionUID = -22430790012186086L;
    @Id
    @Column(name = "id")
    private Long id;
    /**
     * 员工id
     */
    @Column(name = "staff_id")
    @ApiModelProperty(name = "staffId", value = "员工id")
    private Long staffId;
    /**
     * 员工手机号
     */
    @Column(name = "mobile_phone")
    @ApiModelProperty(name = "mobilePhone", value = "员工手机号")
    private String mobilePhone;
    /**
     * 员工名字
     */
    @Column(name = "staff_name")
    @ApiModelProperty(name = "staffName", value = "员工名字")
    private String staffName;
    /**
     * 登录时间
     */
    @Column(name = "login_time")
    @ApiModelProperty(name = "loginTime", value = "登录时间")
    private Date loginTime;
    /**
     * 失败原因
     */
    @Column(name = "massage")
    @ApiModelProperty(name = "massage", value = "失败原因")
    private String massage;
    /**
     * 登录方式，0密码登录，1验证码登录
     */
    @Column(name = "login_type")
    @ApiModelProperty(name = "loginType", value = "登录方式，0密码登录，1验证码登录")
    private Integer loginType;

    /**
     * 登录方式，0密码登录，1验证码登录
     */
    @Column(name = "state")
    @ApiModelProperty(name = "state", value = "登录是否成功，0成功，1失败")
    private Integer state;
    @JsonIgnore
    public String getTab(){
        return DateUtils.YMFormat(loginTime);
    }

}
