package com.kym.entity.admin;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.kym.entity.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author skyline
 * @since 2023-07-11
 */
@Getter
@Setter
@TableName("t_admin_user")
@Accessors(chain = true)
public class AdminUser extends BaseEntity implements Serializable {

    public static final int STATUS_禁用=0;
    public static final  int STATUS_启用=1;

    private static final long serialVersionUID = 1L;

    /**
     * 公司id
     */
    private Long companyId;

    /**
     * 用户名
     */
    private String username;

    /**
     * 密码 返回前端忽略
     */
    @JsonIgnore
    private String password;

    /**
     * 昵称
     */
    private String nickname;

    /**
     * 手机号
     */
    private String mobilePhone;

    /**
     * 头像
     */
    private String avatar;

    /**
     * 0:禁用 1:启用
     */
    private Integer status;

    /**
     * 最后登录时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime lastLoginTime;


    /**
     * 微信小程序open id
     */
    private String openId;

}
