package com.tmerclub.cloud.user.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;

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

/**
 * @author gaozijie
 * @date 2023-05-24
 */
public class AllinpayUserExcelDTO 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 = 1;
    /**
     * 需要合并的列数组
     */
    public static final int[] MERGE_COLUMN_INDEX = {};

    /**
     * 需要批注的列
     */
    public static final int[] COMMENT_INDEX = {2};

    public static final String[] COMMENTS = {
            "由字母、数字和特殊符号三种字符组成8-20位半角字符，区分大小写"
    };

    @ExcelProperty(value = "序号", index = 0)
    private String seq;

    @ExcelProperty(value = "手机号(必填)", index = 1)
    @ColumnWidth(20)
    private String phone;

    @ExcelProperty(value = "密码(必填)", index = 2)
    @ColumnWidth(16)
    private String password;

    @ExcelProperty(value = "用户昵称(最多15个字符)，必填", index = 3)
    @ColumnWidth(30)
    private String nickName;

    @ExcelProperty(value = "会员类型(0普通会员/1付费会员(不填默认为普通会员)", index = 4)
    @ColumnWidth(15)
    private Integer levelType;

    @ExcelProperty(value = "付费会员等级(付费会员必填，普通会员以成长值为准)", index = 5)
    @ColumnWidth(15)
    private String level;

    /**
     * 注解@ContentStyle(dataFormat = 49) 设置单元格格式为文本格式
     * 只会将对象属性所在单元格设置为文本格式，所在列的其他单元格还是为自定义格式
     */
    @DateTimeFormat("yyyy-MM-dd")
    @ExcelProperty(value = "vip结束时间(格式:2021-08-08，会员类型是1则必填)", index = 6)
    @ColumnWidth(25)
    private Date vipEndTime;

    @ExcelProperty(value = "邮箱", index = 7)
    @ColumnWidth(20)
    private String email;

    @ExcelProperty(value = "性别(0男/1女)", index = 8)
    private String sex;

    @ExcelProperty(value = "生日(格式:2009-11-27)", index = 9)
    @ColumnWidth(20)
    private String birthDate;

    @ExcelProperty(value = "积分(限整数)", index = 10)
    private String score;

    @ExcelProperty(value = "成长值(限整数)", index = 11)
    private String growth;

    public String getSeq() {
        return seq;
    }

    public void setSeq(String seq) {
        this.seq = seq;
    }

    public String getPhone() {
        return phone;
    }

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

    public String getPassword() {
        return password;
    }

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

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public Integer getLevelType() {
        return levelType;
    }

    public void setLevelType(Integer levelType) {
        this.levelType = levelType;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public Date getVipEndTime() {
        return vipEndTime;
    }

    public void setVipEndTime(Date vipEndTime) {
        this.vipEndTime = vipEndTime;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getSex() {
        return sex;
    }

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

    public String getBirthDate() {
        return birthDate;
    }

    public void setBirthDate(String birthDate) {
        this.birthDate = birthDate;
    }

    public String getScore() {
        return score;
    }

    public void setScore(String score) {
        this.score = score;
    }

    public String getGrowth() {
        return growth;
    }

    public void setGrowth(String growth) {
        this.growth = growth;
    }

    @Override
    public String toString() {
        return "AllinpayUserExcelDTO{" +
                "seq='" + seq + '\'' +
                ", phone='" + phone + '\'' +
                ", password='" + password + '\'' +
                ", nickName='" + nickName + '\'' +
                ", levelType=" + levelType +
                ", level='" + level + '\'' +
                ", vipEndTime=" + vipEndTime +
                ", email='" + email + '\'' +
                ", sex='" + sex + '\'' +
                ", birthDate='" + birthDate + '\'' +
                ", score='" + score + '\'' +
                ", growth='" + growth + '\'' +
                '}';
    }
}
