package shop.alien.entity.store;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 用户表
 *
 * @author system
 * @since 2025-01-XX
 */
@Data
@JsonInclude
@TableName("life_user")
@ApiModel(value = "LifeUser对象", description = "用户表")
public class LifeUser implements Serializable {
    private static final long serialVersionUID = 1L;

    /** logout_flag：未注销 */
    public static final int LOGOUT_FLAG_NORMAL = 0;
    /** logout_flag：已注销 */
    public static final int LOGOUT_FLAG_DONE = 1;
    /** logout_flag：注销冷静期 */
    public static final int LOGOUT_FLAG_COOLING = 2;
    /** 注销完成后禁止重新注册的天数（自 logoutTime 日起，T+14 00:00 起可注册） */
    public static final int RE_REGISTER_BLOCK_DAYS = 14;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "用户姓名")
    @TableField("user_name")
    private String userName;

    @ApiModelProperty(value = "用户性别")
    @TableField("user_sex")
    private String userSex;

    @ApiModelProperty(value = "用户生日")
    @TableField(value = "user_brithday")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date userBirthday;

    @ApiModelProperty(value = "官方号码")
    @TableField("guanfang_phone")
    private String guanfangPhone;

    @ApiModelProperty(value = "用户手机号")
    @TableField("user_phone")
    private String userPhone;

    @ApiModelProperty(value = "登录密码")
    @TableField("password")
    @JsonIgnore
    private String password;

    @ApiModelProperty(value = "用户头像照片")
    @TableField("user_image")
    private String userImage;

    @ApiModelProperty(value = "消费时间")
    @TableField("xiaofei_time")
    private Integer xiaofeiTime;

    @ApiModelProperty(value = "消费金额")
    @TableField("xiaofei_amount")
    private BigDecimal xiaofeiAmount;

    @ApiModelProperty(value = "差评时间")
    @TableField(value = "chaping_time")
    private Integer chapingTime;

    @ApiModelProperty(value = "真实姓名")
    @TableField("real_name")
    private String realName;

    @ApiModelProperty(value = "省")
    @TableField(value = "province")
    private String province;

    @ApiModelProperty(value = "市")
    @TableField(value = "city")
    private String city;

    @ApiModelProperty(value = "区")
    @TableField(value = "district")
    private String district;

    @ApiModelProperty(value = "地址")
    @TableField(value = "address")
    private String address;

    @ApiModelProperty(value = "个人简介")
    @TableField(value = "jianjie")
    private String jianjie;

    @ApiModelProperty(value = "删除标记, 0:未删除, 1:已删除")
    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    @ApiModelProperty(value = "创建人ID")
    @TableField("created_user_id")
    private Integer createdUserId;

    @ApiModelProperty(value = "修改时间")
    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;

    @ApiModelProperty(value = "修改人ID")
    @TableField("updated_user_id")
    private Integer updatedUserId;

    @ApiModelProperty(value = "身份证")
    @TableField("id_card")
    private String idCard;

    @ApiModelProperty(value = "国籍")
    @TableField("nationality")
    private String nationality;

    @ApiModelProperty(value = "英文名字")
    @TableField("english_name")
    private String englishName;

    @ApiModelProperty(value = "证件有效期")
    @TableField("expiration_date")
    private String expirationDate;

    @ApiModelProperty(value = "邀请码")
    @TableField("invited_num")
    private String invitedNum;

    @ApiModelProperty(value = "注销标记, 0:未注销, 1:已注销, 2:注销冷静期")
    @TableField("logout_flag")
    private Integer logoutFlag;

    @ApiModelProperty(value = "注销原因")
    @TableField("logout_reason")
    private String logoutReason;

    @ApiModelProperty(value = "注销申请时间")
    @TableField(value = "logout_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date logoutTime;

    @ApiModelProperty(value = "打卡广场小人图片id")
    @TableField("clock_img_id")
    private Integer clockImgId;

    @ApiModelProperty(value = "是否同步")
    @TableField("is_sync")
    private Integer isSync;

    @ApiModelProperty(value = "邀请码")
    @TableField("invite_code")
    private String inviteCode;

    @ApiModelProperty(value = "绑定他人邀请码")
    @TableField("bind_invite_code")
    private String bindInviteCode;

    @ApiModelProperty(value = "用户积分")
    @TableField("user_point")
    private Integer userPoint;

    @ApiModelProperty(value = "支付宝账户")
    @TableField("alipay_account")
    private String alipayAccount;

    @ApiModelProperty(value = "账户余额")
    @TableField("money")
    private BigDecimal money;

    @ApiModelProperty(value = "支付密码")
    @TableField("pay_password")
    private String payPassword;

    @ApiModelProperty(value = "是否被封禁(0-否  1-是)")
    @TableField("is_banned")
    private Integer isBanned;

    @ApiModelProperty(value = "关注数")
    @TableField(exist = false)
    private Integer followCount;

    @ApiModelProperty(value = "粉丝数")
    @TableField(exist = false)
    private Integer fansCount;

    @ApiModelProperty(value = "获赞数")
    @TableField(exist = false)
    private Integer likeCount;


    @ApiModelProperty(value = "是否弹窗(0默认允许弹窗  1拒绝弹窗 )")
    @TableField("is_popup")
    private Integer isPopup;

    @ApiModelProperty(value = "注销其他原因")
    @TableField("logout_context")
    private String logoutContext;

    @ApiModelProperty(value = "设备唯一标识ID")
    @TableField("device_id")
    private String deviceId;

}
