package shop.alien.entity.store;

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

import java.util.Date;

/**
 * 二期-门店用户
 *
 * @author ssk
 * @since 2024-12-11
 */
@Data
@JsonInclude
@TableName("store_user")
@ApiModel(value = "StoreUser对象", description = "门店用户")
public class StoreUser extends Model<StoreUser> {

    public StoreUser() {
    }

    public StoreUser(Integer id, Integer money) {
        this.id = id;
        this.money = money;
    }

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

    @ApiModelProperty(value = "门店id")
    @TableField("store_id")
    private Integer storeId;

    @ApiModelProperty(value = "手机号")
    @TableField("phone")
    private String phone;

    @ApiModelProperty(value = "姓名")
    @TableField("name")
    private String name;

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

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

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


    @ApiModelProperty(value = "用户余额,单位分")
    @TableField("money")
    private Integer money;

    @ApiModelProperty(value = "用户状态")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "密码状态, 0:初始密码, 1:已修改, 2:手机号已验证")
    @TableField("pass_type")
    private Integer passType;

    @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 = "昵称")
    @TableField("nick_name")
    private String nickName;

    @ApiModelProperty(value = "账号简介")
    @TableField("account_blurb")
    private String accountBlurb;

    @ApiModelProperty(value = "注销code")
    @TableField("logout_code")
    private String logoutCode;

    @ApiModelProperty(value = "头像")
    @TableField("head_img")
    private String headImg;

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

    @TableField(exist = false)
    private String userName;
    @TableField(exist = false)
    private String userImage;
    @TableField(exist = false)
    private String jianjie;
    @TableField(exist = false)
    private String moneyStr;
}
