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

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.time.LocalDate;
import java.util.*;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Schema(description = "管理后台 - 客户拜访记录 Response VO")
@Data
@ExcelIgnoreUnannotated
public class InfoRespVO {

    @Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
//    @ExcelProperty("主键ID")
    private Long id;

    @Schema(description = "客户姓名", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("客户姓名")
    private String customerName;

    @Schema(description = "联系方式", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("联系方式")
    private String contact;

    @Schema(description = "客户公司名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("客户公司名称")
    private String companyName;

    @Schema(description = "客户所属部门", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty(value = "客户所属部门", converter = DictConvert.class)
    @DictFormat("customer_dept")
    private String department;

    @Schema(description = "所在地区", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("所在地区")
    private String regionFullName;

    @Schema(description = "省名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String provinceName;

    @Schema(description = "市名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String cityName;

    @Schema(description = "区名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String areaName;

    @Schema(description = "详细地址", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("详细地址")
    private String locationText;

    @Schema(description = "经度", requiredMode = Schema.RequiredMode.REQUIRED)
    private BigDecimal longitude;

    @Schema(description = "纬度", requiredMode = Schema.RequiredMode.REQUIRED)
    private BigDecimal latitude;

    @Schema(description = "定位静态图", requiredMode = Schema.RequiredMode.REQUIRED)
    private String locationImage;

    @Schema(description = "拜访日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("拜访日期")
    private LocalDateTime visitDate;

    @Schema(description = "性质等级", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty(value = "性质等级", converter = DictConvert.class)
    @DictFormat("customer_type")
    private Integer customerStatus;

    @Schema(description = "拜访品种（多选，逗号分隔）")
    private String visitProductIds;

    @Schema(description = "拜访品种（多选，逗号分隔）")
    @ExcelProperty("拜访品种")
    private String visitProductNames;

    @Schema(description = "拜访方式（字典）")
    @ExcelProperty(value = "拜访方式", converter = DictConvert.class)
    @DictFormat("visit_method") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer visitMethod;

    @Schema(description = "拜访类型（字典）", example = "2")
    @ExcelProperty(value = "拜访类型", converter = DictConvert.class)
    @DictFormat("visit_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer visitType;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
//    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "服务内容")
    @ExcelProperty("服务内容")
    private String serviceContent;

    @Schema(description = "客户反馈")
    @ExcelProperty("客户反馈")
    private String customerFeedback;

    @Schema(description = "服务记录图片URL列表（JSON数组）")
    private String serviceImages;

    @Schema(description = "业务经理")
    @ExcelProperty("业务经理")
    private String creator;



}