package org.agt.module.license.controller.admin.customer.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.agt.framework.excel.core.annotations.DictFormat;
import org.agt.framework.excel.core.convert.DictConvert;

import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "管理后台 - 客户 Response VO")
@Data
@ExcelIgnoreUnannotated
public class CustomerRespVO {

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

    @Schema(description = "客户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
    @ExcelProperty("客户名称")
    private String name;

    @Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2000")
    @ExcelProperty("客户编号")
    private Long code;

    @Schema(description = "客户类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty(value = "客户类型", converter = DictConvert.class)
    @DictFormat("lic_customer_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer type;

    @Schema(description = "地区", requiredMode = Schema.RequiredMode.REQUIRED, example = "5186")
    private Long areaId;

    @Schema(description = "地区编号列表", example = "5186")
    private List<Integer> areaIds;

    @Schema(description = "地区名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "广东省")
    @ExcelProperty("地区")
    private String areaNames;

    @Schema(description = "联系人", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("联系人")
    private String contacts;

    @Schema(description = "角色")
    @ExcelProperty("角色")
    private String role;

    @Schema(description = "联系电话")
    @ExcelProperty("联系电话")
    private String phone;

    @Schema(description = "邮箱")
    @ExcelProperty("邮箱")
    private String email;

    @Schema(description = "备注", example = "随便")
    @ExcelProperty("备注")
    private String remark;

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

}