package org.dromara.mp.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.mp.domain.UserWorkerAccount;

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


/**
 * 自雇者账户视图对象 user_worker_account
 *
 * @author LionLi
 * @date 2024-04-28
 * @date 2024-04-11
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = UserWorkerAccount.class)
public class UserWorkerAccountVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ExcelProperty(value = "主键")
    private Long id;

    /**
     * 自雇者id
     */
    @ExcelProperty(value = "自雇者id")
    private Long workId;

    /**
     * 账户id
     */
    @ExcelProperty(value = "账户id")
    private Long accId;

    /**
     * 银行类型（字典）
     */
    @ExcelProperty(value = "银行类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "字=典")
    private String bankType;

    /**
     * 银行账号
     */
    @ExcelProperty(value = "银行账号")
    private String bankCard;

    /**
     * 是否默认（0:否 1:是）
     */
    @ExcelProperty(value = "是否默认", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0=:否,1=:是")
    private Long isDefault;

    /**
     * 添加时间
     */
    @ExcelProperty(value = "添加时间")
    private Date addTime;

    /**
     * 银行卡照片
     */
    @ExcelProperty(value = "银行卡照片")
    private String bankCardPic;


    /**
     * 预留手机号
     */
    @ExcelProperty(value = "预留手机号")
    private String phone;

    /**
     * 结算通道
     */
    @ExcelProperty(value = "结算通道")
    private String passage;


    private String cardType;

    //用工姓名
    private String name;

    private Integer status;

    public String getPhone() {
        return this.phone;
//        if(StringUtils.isNotEmpty(this.phone)){
//            return StringUtils.phoneHide(this.phone);
//        }else{
//            return "--";
//        }
    }

}
