package com.ruoyi.frequency.customer.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.vo.UserInfo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 用户对象 t_customer
 *
 * @author liwenlong
 * @date 2023-07-20
 */
@Data
@Accessors(chain = true)
@TableName("t_customer")
public class Customer extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 唯一标识 */
    private Long id;

    /** 删除标识;1正常 2 删除 3 禁用 */
    private Integer delFlag;

    /** 登录账号 */
    @Excel(name = "登录账号")
    private String account;

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

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

    /** 头像 */
    @Excel(name = "头像")
    private String avatar;

    /** 区号 */
    @Excel(name = "区号")
    private String areaCode;

    /** 登录密码 */
    @Excel(name = "登录密码")
    private String loginPwd;

    /** 支付密码 */
    @Excel(name = "支付密码")
    private String payPwd;

    /** 注销时间 */
    @Excel(name = "注销时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date cancellationTime;

    /** 手机id */
    @Excel(name = "手机id")
    private String clientId;

    /** 微信id */
    @Excel(name = "微信id")
    private String wechatOpenid;

    /** 小程序id */
    @Excel(name = "小程序id")
    private String wechatAppletOpenid;

    /** 小程序unionId*/
    @Excel(name = "小程序unionId")
    private String unionId;

    /** 苹果id */
    @Excel(name = "苹果id")
    private String appleOpenid;

    /** 推送是否关闭;1不关闭2  关闭 */
    @Excel(name = "推送是否关闭;1不关闭2  关闭")
    private Integer closeMessage;

    /** 邀请码 */
    @Excel(name = "邀请码")
    private String invitationCode;

    /** 余额 */
    @Excel(name = "余额")
    private BigDecimal balance;


    /** 入行时间 */
    @Excel(name = "入行时间", width = 30, dateFormat = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy")
    private Date enterDate;

    /** 在线状态;1:在线,2离线 */
    @Excel(name = "在线状态;1:在线,2离线")
    private Integer onlineStatus;

    /** 在线时长;分钟 */
    @Excel(name = "在线时长;分钟")
    private Integer onlineDuration;

    /** 等级,VIP1 - VIP10 */
    @Excel(name = "等级,VIP1 - VIP10")
    private Long levelId;

    private BigDecimal star;

    @ApiModelProperty(value = "消费金额")
    private BigDecimal consumptionAmount;

    @ApiModelProperty(value = "区域")
    private String area;

    @ApiModelProperty(value = "等级")
    @TableField(exist = false)
    private String levelName;

    @ApiModelProperty(value = "背景图")
    private String backgroundImage;

    @ApiModelProperty(value = "充值抵用金")
    private BigDecimal giveBalance;

    @ApiModelProperty(value = "积分")
    private BigDecimal integral;

    @ApiModelProperty(value = "累计积分")
    private BigDecimal accumulateIntegral;

    @ApiModelProperty("昵称")
    private String name;

    @ApiModelProperty("性别")
    private String sex;

    @ApiModelProperty("开始时间")
    @TableField(exist = false)
    private Date beginTime;

    @ApiModelProperty("结束时间")
    @TableField(exist = false)
    private Date endTime;


    @ApiModelProperty("排序 1在线时长降序 2 在线时长升序")
    @TableField(exist = false)
    private Integer sortType;

    /** 用户粉丝基数 */
    @TableField(exist = false)
    private Long fansNum;

    /** 用户关注基数 */
    @Excel(name = "用户关注基数")
    @TableField(exist = false)
    private Long followNum;

    @ApiModelProperty("用户ids")
    @TableField(exist = false)
    private List<Long> userIds;


    @TableField(exist = false)
    private UserInfo userInfo;

    @ApiModelProperty("订单数量")
    @TableField(exist = false)
    private Integer orderCount;

    @ApiModelProperty("订单单价")
    @TableField(exist = false)
    private BigDecimal unitPrice;

    @ApiModelProperty("最近交易时间")
    @TableField(exist = false)
    private Date lastTransactionTime;

    @ApiModelProperty("当月金额、业绩")
    @TableField(exist = false)
    private BigDecimal monthAmount;

}
