
package com.tmerclub.cloud.user.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.tmerclub.cloud.common.model.ExcelModel;
import com.tmerclub.cloud.user.converter.LevelTypeConverter;
import com.tmerclub.cloud.user.converter.UserStatusConverter;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

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

/**
 * 用户信息导出VO
 *
 * @author cl
 * @date 2021-05-11 09:39:02
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString
public class UserExcelVO extends ExcelModel implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * excel 信息
     */
    public static final String EXCEL_NAME = "用户信息";
    public static final String SHEET_NAME = "sheet";
    /**
     * 哪一行开始导出
     */
    public static final int MERGE_ROW_INDEX = 2;
    /**
     * 需要合并的列数组
     */
    public static final int[] MERGE_COLUMN_INDEX = {};

    @ExcelProperty(value = {"用户信息", "序号"}, index = 0)
    private String seq;

    @ExcelProperty(value = {"用户信息", "用户昵称"}, index = 1)
    private String nickName;

    @ExcelProperty(value = {"用户信息", "手机号码"}, index = 2)
    private String phone;

    /**
     * 0 普通会员 1 付费会员 SeckillSkuMapper.xml
     */
    @ExcelProperty(value = {"用户信息", "会员类型"}, index = 3, converter = LevelTypeConverter.class)
    private Integer levelType;

    @ExcelProperty(value = {"用户信息", "会员等级"}, index = 4)
    private String levelName;

    @ExcelProperty(value = {"用户信息", "付费会员等级"}, index = 5)
    private String vipLevelName;

    @ExcelProperty(value = {"用户信息", "积分"}, index = 6)
    private Long score;

    @ExcelProperty(value = {"用户信息", "状态"}, index = 7, converter = UserStatusConverter.class)
    private Integer status;


    @ExcelProperty(value = {"用户信息", "会员成长值"}, index = 8)
    private Long growth;

    // -----------------------------------------------------以上是user 的信息

    @ExcelProperty(value = {"用户信息", "消费金额"}, index = 9)
    private Double consAmount;

    @ExcelProperty(value = {"用户信息", "实付金额"}, index = 10)
    private Double actualAmount;

    @ExcelProperty(value = {"用户信息", "消费次数"}, index = 11)
    private Integer consTimes;

    @ExcelProperty(value = {"用户信息", "平均折扣"}, index = 12)
    private Double averDiscount;

    @ExcelProperty(value = {"用户信息", "充值金额"}, index = 13)
    private Double rechargeAmount;

    @ExcelProperty({"用户信息", "充值次数"})
    private Integer rechargeTimes;

    @ExcelProperty(value = {"用户信息", "售后金额"}, index = 14)
    private Double afterSaleAmount;

    @ExcelProperty(value = {"用户信息", "售后次数"}, index = 15)
    private Integer afterSaleTimes;

    @ExcelProperty(value = {"用户信息", "当前积分"}, index = 16)
    private Long currentScore;

    @ExcelProperty(value = {"用户信息", "累积积分"}, index = 17)
    private Long sumScore;

    @ExcelProperty(value = {"用户信息", "当前余额"}, index = 18)
    private Double currentBalance;

    @ExcelProperty(value = {"用户信息", "累计余额"}, index = 19)
    private Double sumBalance;

    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = {"用户信息", "注册时间"}, index = 20)
    private Date createTime;

    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = {"用户信息", "最近消费时间"}, index = 21)
    private Date reConsTime;


}
