package shop.alien.entity.store;

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

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

/**
 * 用户
 */
@Data
@JsonInclude
@TableName("life_user")
public class LifeUser implements Serializable {
    private static final long serialVersionUID = 1L;

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

    @TableField("user_name")
    private String userName;

    @TableField("real_name")
    private String realName;

    @TableField("user_sex")
    private String userSex;

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

    @TableField("guanfang_phone")
    private String guanfangPhone;

    @TableField("user_phone")
    private String userPhone;

    @TableField("id_card")
    private String idCard;

    @TableField("user_image")
    private String userImage;

    @TableField("xiaofei_time")
    private Integer xiaofeiTime;

    @TableField("xiaofei_amount")
    private double xiaofeiAmount;

    @TableField(value = "chaping_time")
    private Integer chapingTime;

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

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

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

    @TableField(value = "address")
    private String address;

    @TableField(value = "jianjie")
    private String jianjie;

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

    @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.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 = "注销标记, 0:未注销, 1:已注销")
    @TableField("logout_flag")
    private Integer logoutFlag;

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

    @ApiModelProperty(value = "注销申请时间")
    @TableField(value = "logout_time", fill = FieldFill.INSERT)
    @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("invite_code")
    private String inviteCode;

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

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