package cn.iocoder.yudao.module.visit.controller.admin.customerinfo.vo;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import cn.iocoder.yudao.module.system.enums.DictTypeConstants;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.math.BigDecimal;

/**
 * 用户 Excel 导入 VO
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = false) // 设置 chain = false，避免用户导入有问题
public class CustomerImportExcelVO {

    @ExcelProperty("客户姓名")
    private String customerName;

    @ExcelProperty("联系方式")
    @Pattern(regexp = "^$|^\\d{11}$", message = "联系方式必须是11位数字")
    private String contact;

    @ExcelProperty("公司名称")
    private String companyName;

    @ExcelProperty(value = "性质等级", converter = DictConvert.class)
    @DictFormat("customer_type")
    private Integer customerType;

    @ExcelProperty(value = "客户部门", converter = DictConvert.class)
    @DictFormat("customer_dept")
    private String department;

}
