package com.ylx.massage.domain;

import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

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

/**
 * 微信用户表
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName(value = "t_wx_user",autoResultMap = true)
@ApiModel(value = "TWxUser", description = "微信用户表")
public class TWxUser implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId("id")
    @ApiModelProperty("Id")
    private String id;


    /**
     * 用户的openId
     */
    @TableField("c_openid")
    @ApiModelProperty("用户的openId")
    private String cOpenid;

    /**
     * 角色:0普通,1技师
     */
    @TableField("role")
    @ApiModelProperty("角色:0普通,1技师")
    private Integer role;

    /**
     * 微信小程序登录会话密钥
     */
    @TableField("c_session_key")
    @ApiModelProperty("微信小程序登录会话密钥")
    private String cSessionKey;

    /**
     * 头像地址
     */
    @TableField("c_icon")
    @ApiModelProperty("头像地址")
    private String cIcon;

    /**
     * 电话号码
     */
    @TableField("c_phone")
    @ApiModelProperty("电话号码")
    private String cPhone;

    /**
     * 微信小程序unionid
     */
    @TableField("c_unionid")
    @ApiModelProperty("微信小程序unionid")
    private String cUnionid;

    /**
     * 昵称
     */
    @TableField("c_nick_name")
    @ApiModelProperty("昵称")
    private String cNickName;

    /**
     * 性别(0女1男)
     */
    @ApiModelProperty("性别(0女1男)")
    private Integer sex;

    /**
     * 密码
     */
    @TableField("c_password")
    @ApiModelProperty("密码")
    private String cPassword;

    /**
     * 消费金额
     */
    @TableField("d_money")
    @ApiModelProperty("消费金额")
    private BigDecimal dMoney;

    /**
     * 下单次数
     */
    @TableField("n_num")
    @ApiModelProperty("下单次数")
    private Integer nNum;

    /**
     * 地址信息
     */
    @TableField(value = "c_address_list",typeHandler = FastjsonTypeHandler.class)
    @ApiModelProperty("地址信息jsonarray")
    private JSONArray cAddressList;

    /**
     * 当前购物金剩余（原余额）
     */
    @TableField("d_balance")
    @ApiModelProperty("当前购物金剩余")
    private BigDecimal dBalance;

    /**
     * 总收益
     */
    @TableField("d_all_money")
    @ApiModelProperty("总收益")
    private BigDecimal dAllMoney;


    @TableField("get_amount")
    @ApiModelProperty("可提现金额")
    private BigDecimal getAmount;

    /**
     * 分销码
     */
    @TableField("c_scan_img")
    @ApiModelProperty("分销码")
    private String cScanImg;

    /**
     * 分销收益
     */
    @TableField("distribution_amount")
    @ApiModelProperty("分销金额")
    private BigDecimal distributionAmount;

    /**
     * 推荐者信息（上级）id
     */
    @TableField(value = "c_up_user")
    @ApiModelProperty("推荐者信息（上级）id")
    private String cUpUser;

    /**
     * 默认地址
     */
    @TableField("c_mr_address_id")
    @ApiModelProperty("默认地址")
    private String cMrAddressId;

    @TableField("create_time")
    @ApiModelProperty("系统创建时间")
    private String createTime;

    @ApiModelProperty("是否删除0否1是")
    @TableLogic
    private Integer isDelete;

    @ApiModelProperty("是否绑定一账通 0否 1是")
    private Integer isBind;

    @ApiModelProperty("本地生活用户id")
    private String localLiveUserId;

    /**
     * 审核状态：-1-申请入驻 0-待入驻 1-待审核，2-审核通过，3-审核驳回
     */
    private Integer auditStatus;

    public String getcOpenid() {
        return cOpenid;
    }

    public void setcOpenid(String cOpenid) {
        this.cOpenid = cOpenid;
    }

    public String getcSessionKey() {
        return cSessionKey;
    }

    public void setcSessionKey(String cSessionKey) {
        this.cSessionKey = cSessionKey;
    }

    public String getcIcon() {
        return cIcon;
    }

    public void setcIcon(String cIcon) {
        this.cIcon = cIcon;
    }

    public String getcPhone() {
        return cPhone;
    }

    public void setcPhone(String cPhone) {
        this.cPhone = cPhone;
    }

    public String getcUnionid() {
        return cUnionid;
    }

    public void setcUnionid(String cUnionid) {
        this.cUnionid = cUnionid;
    }

    public String getcNickName() {
        return cNickName;
    }

    public void setcNickName(String cNickName) {
        this.cNickName = cNickName;
    }

    public BigDecimal getdMoney() {
        return dMoney;
    }

    public void setdMoney(BigDecimal dMoney) {
        this.dMoney = dMoney;
    }

    public Integer getnNum() {
        return nNum;
    }

    public void setnNum(Integer nNum) {
        this.nNum = nNum;
    }

    public JSONArray getcAddressList() {
        return cAddressList;
    }

    public void setcAddressList(JSONArray cAddressList) {
        this.cAddressList = cAddressList;
    }

    public BigDecimal getdBalance() {
        return dBalance;
    }

    public void setdBalance(BigDecimal dBalance) {
        this.dBalance = dBalance;
    }

    public BigDecimal getdAllMoney() {
        return dAllMoney;
    }

    public void setdAllMoney(BigDecimal dAllMoney) {
        this.dAllMoney = dAllMoney;
    }

    public String getcScanImg() {
        return cScanImg;
    }

    public void setcScanImg(String cScanImg) {
        this.cScanImg = cScanImg;
    }

    public String getcUpUser() {
        return cUpUser;
    }

    public void setcUpUser(String cUpUser) {
        this.cUpUser = cUpUser;
    }

    public String getcMrAddressId() {
        return cMrAddressId;
    }

    public void setcMrAddressId(String cMrAddressId) {
        this.cMrAddressId = cMrAddressId;
    }
}
