package com.fs.store.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fs.common.annotation.Excel;
import com.fs.common.core.domain.BaseEntity;
import com.vdurmont.emoji.EmojiParser;
import org.apache.commons.lang3.StringUtils;

/**
 * 用户对象 fs_user
 *
 * @author fs
 * @date 2022-03-15
 */
public class FsUser extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 用户id */
    private Long userId;
    @Excel(name = "帐号")
    private String username;
    /** 用户密码（跟pwd） */
    private String password;

    /** 真实姓名 */
    private String realName;

    /** 生日 */
    private Long birthday;

    /** 身份证号码 */
    private String idCard;

    @Excel(name = "用户头像")
    private String avatar;

    /** 用户昵称 */
    @Excel(name = "用户昵称")
    private String nickname;

    /** 用户备注 */
    @Excel(name = "用户备注")
    private String remark;


    /** 手机号码 */
    @Excel(name = "手机号码")
    private String phone;

    /** 最后一次登录ip */
    @Excel(name = "最后一次登录ip")
    private String lastIp;

    /** 用户余额 */
    @Excel(name = "用户余额")
    private BigDecimal nowMoney;

    /** 佣金金额 */
    @Excel(name = "佣金金额")
    private BigDecimal brokeragePrice;

    /** 用户剩余积分 */
    @Excel(name = "用户剩余积分")
    private BigDecimal integral;

    /** 连续签到天数 */
    @Excel(name = "连续签到天数")
    private Long signNum;

    /** 1为正常，0为禁止 */
    @Excel(name = "状态：1为正常，0为禁止")
    private Integer status;
    private String statusText;

    /** 等级 */
    private Integer level;

    /** 推广上级用户ID */
    private Long spreadUserId;

    /** 推广员关联时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date spreadTime;

    /** 用户类型 */
    private String userType;

    /** 是否为推广员 */
    private Integer isPromoter;

    /** 用户购买次数 */
    private Long payCount;

    /** 下级人数 */
    private Long spreadCount;

    /** 详细地址 */
    private String addres;


    private String maOpenId;

    private String mpOpenId;

    private String unionId;

    private Integer isDel;

    private Integer isWeixinAuth;

    private Long companyId;

    private Long companyUserId;
    private String companyUserName;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "推线日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date registerDate;
    @Excel(name = "推线编码")
    private String registerCode;
    @Excel(name = "渠道")
    private String source;

    private String userCode;

    private Integer isVip;
    private Date  vipStartDate;
    private Date  vipEndDate;
    private Integer vipLevel;
    private Integer vipStatus;

    private String jpushId;

    private Integer sex;
    private Integer isAddQw;
    private Long qwExtId;
    private Integer isShow;//是否展示购买以及订单状态



    private String courseMaOpenId;//看课小程序openId


    public Long getQwExtId() {
        return qwExtId;
    }

    public void setQwExtId(Long qwExtId) {
        this.qwExtId = qwExtId;
    }

    public String getCourseMaOpenId() {
        return courseMaOpenId;
    }

    public void setCourseMaOpenId(String courseMaOpenId) {
        this.courseMaOpenId = courseMaOpenId;
    }
    public String getStatusText() {
        return statusText;
    }

    public void setStatusText(String statusText) {
        this.statusText = statusText;
    }

    public String getCompanyUserName() {
        return companyUserName;
    }

    public void setCompanyUserName(String companyUserName) {
        this.companyUserName = companyUserName;
    }
    public Integer getIsAddQw() {
        return isAddQw;
    }

    public void setIsAddQw(Integer isAddQw) {
        this.isAddQw = isAddQw;
    }

    public Integer getIsShow() {
        return isShow;
    }

    public void setIsShow(Integer isShow) {
        this.isShow = isShow;
    }

    public String getJpushId() {
        return jpushId;
    }

    public void setJpushId(String jpushId) {
        this.jpushId = jpushId;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public Integer getIsVip() {
        return isVip;
    }

    public void setIsVip(Integer isVip) {
        this.isVip = isVip;
    }

    public Date getVipEndDate() {
        return vipEndDate;
    }

    public void setVipEndDate(Date vipEndDate) {
        this.vipEndDate = vipEndDate;
    }

    public Date getVipStartDate() {
        return vipStartDate;
    }

    public void setVipStartDate(Date vipStartDate) {
        this.vipStartDate = vipStartDate;
    }

    public Integer getVipLevel() {
        return vipLevel;
    }

    public void setVipLevel(Integer vipLevel) {
        this.vipLevel = vipLevel;
    }

    public Integer getVipStatus() {
        return vipStatus;
    }

    public void setVipStatus(Integer vipStatus) {
        this.vipStatus = vipStatus;
    }

    public String getUserCode() {
        return userCode;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    public String getMaOpenId() {
        return maOpenId;
    }

    public void setMaOpenId(String maOpenId) {
        this.maOpenId = maOpenId;
    }

    public String getMpOpenId() {
        return mpOpenId;
    }

    public void setMpOpenId(String mpOpenId) {
        this.mpOpenId = mpOpenId;
    }

    public String getUnionId() {
        return unionId;
    }

    public void setUnionId(String unionId) {
        this.unionId = unionId;
    }

    public Date getRegisterDate() {
        return registerDate;
    }

    public void setRegisterDate(Date registerDate) {
        this.registerDate = registerDate;
    }

    public String getRegisterCode() {
        return registerCode;
    }

    public void setRegisterCode(String registerCode) {
        this.registerCode = registerCode;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public Long getCompanyUserId() {
        return companyUserId;
    }

    public void setCompanyUserId(Long companyUserId) {
        this.companyUserId = companyUserId;
    }

    public Integer getIsWeixinAuth() {
        return isWeixinAuth;
    }

    public void setIsWeixinAuth(Integer isWeixinAuth) {
        this.isWeixinAuth = isWeixinAuth;
    }

    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setUsername(String username)
    {
        this.username = username;
    }

    public String getUsername()
    {
        return username;
    }
    public void setPassword(String password)
    {
        this.password = password;
    }

    public String getPassword()
    {
        return password;
    }
    public void setRealName(String realName)
    {
        this.realName = realName;
    }

    public String getRealName()
    {
        return realName;
    }
    public void setBirthday(Long birthday)
    {
        this.birthday = birthday;
    }

    public Long getBirthday()
    {
        return birthday;
    }
    public void setIdCard(String idCard)
    {
        this.idCard = idCard;
    }

    public String getIdCard()
    {
        return idCard;
    }

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }

    public void setNickname(String nickname)
    {
        if(StringUtils.isNotEmpty(nickname)){
            this.nickname= EmojiParser.parseToHtmlDecimal(nickname);
        }
        else{
            this.nickname= nickname;
        }
    }

    public String getNickname()
    {
        if(StringUtils.isNotEmpty(nickname)){
            return EmojiParser.parseToUnicode(nickname);
        }
        else{
            return nickname;
        }
    }
    public void setAvatar(String avatar)
    {
        this.avatar = avatar;
    }

    public String getAvatar()
    {
        return avatar;
    }
    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public String getPhone()
    {
        return phone;
    }
    public void setLastIp(String lastIp)
    {
        this.lastIp = lastIp;
    }

    public String getLastIp()
    {
        return lastIp;
    }
    public void setNowMoney(BigDecimal nowMoney)
    {
        this.nowMoney = nowMoney;
    }

    public BigDecimal getNowMoney()
    {
        return nowMoney;
    }
    public void setBrokeragePrice(BigDecimal brokeragePrice)
    {
        this.brokeragePrice = brokeragePrice;
    }

    public BigDecimal getBrokeragePrice()
    {
        return brokeragePrice;
    }
//    public void setIntegral(BigDecimal integral)
//    {
//        this.integral = integral;
//    }
//
//    public BigDecimal getIntegral()
//    {
//        return integral;
//    }


    public BigDecimal getIntegral() {
        return integral;
    }

    public void setIntegral(BigDecimal integral) {
        this.integral = integral;
    }

    public void setSignNum(Long signNum)
    {
        this.signNum = signNum;
    }

    public Long getSignNum()
    {
        return signNum;
    }
    public void setStatus(Integer status)
    {
        this.status = status;
    }

    public Integer getStatus()
    {
        return status;
    }
    public void setLevel(Integer level)
    {
        this.level = level;
    }

    public Integer getLevel()
    {
        return level;
    }
    public void setSpreadUserId(Long spreadUserId)
    {
        this.spreadUserId = spreadUserId;
    }

    public Long getSpreadUserId()
    {
        return spreadUserId;
    }
    public void setSpreadTime(Date spreadTime)
    {
        this.spreadTime = spreadTime;
    }

    public Date getSpreadTime()
    {
        return spreadTime;
    }
    public void setUserType(String userType)
    {
        this.userType = userType;
    }

    public String getUserType()
    {
        return userType;
    }
    public void setIsPromoter(Integer isPromoter)
    {
        this.isPromoter = isPromoter;
    }

    public Integer getIsPromoter()
    {
        return isPromoter;
    }
    public void setPayCount(Long payCount)
    {
        this.payCount = payCount;
    }

    public Long getPayCount()
    {
        return payCount;
    }
    public void setSpreadCount(Long spreadCount)
    {
        this.spreadCount = spreadCount;
    }

    public Long getSpreadCount()
    {
        return spreadCount;
    }
    public void setAddres(String addres)
    {
        this.addres = addres;
    }

    public String getAddres()
    {
        return addres;
    }

    public void setIsDel(Integer isDel)
    {
        this.isDel = isDel;
    }

    public Integer getIsDel()
    {
        return isDel;
    }


}
