package cn.iocoder.yudao.module.asset.controller.admin.customer.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import java.util.List;

@Schema(description = "管理后台 - 客户创建/更新 Request VO")
@Data
public class CustomerSaveReqVO {

    @Schema(description = "主键ID（更新时必填）", example = "1")
    private Long id;

    @Schema(description = "客户编号", example = "KH-2025-001")
    @Size(max = 50, message = "客户编号长度不能超过50个字符")
    private String customerCode;

    @Schema(description = "合作状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "已合作")
    @NotBlank(message = "合作状态不能为空")
    private String coopStatus;

    @Schema(description = "客户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "嘉兴某某物流有限公司")
    @NotBlank(message = "客户名称不能为空")
    @Size(max = 100, message = "客户名称长度不能超过100个字符")
    private String customerName;

    @Schema(description = "省份", example = "浙江省")
    @Size(max = 50, message = "省份长度不能超过50个字符")
    private String province;

    @Schema(description = "城市", example = "嘉兴市")
    @Size(max = 50, message = "城市长度不能超过50个字符")
    private String city;

    @Schema(description = "地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "浙江省嘉兴市南湖区科技大道1号")
    @NotBlank(message = "地址不能为空")
    @Size(max = 255, message = "地址长度不能超过255个字符")
    private String address;

    @Schema(description = "区域", example = "华东")
    @Size(max = 20, message = "区域长度不能超过20个字符")
    private String region;

    @Schema(description = "联系人", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    @NotBlank(message = "联系人不能为空")
    @Size(max = 50, message = "联系人长度不能超过50个字符")
    private String contact;

    @Schema(description = "联系人手机", requiredMode = Schema.RequiredMode.REQUIRED, example = "13800138000")
    @NotBlank(message = "联系人手机不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "联系人手机格式不正确")
    private String contactMobile;

    @Schema(description = "联系人座机", example = "0571-88888888")
    @Size(max = 20, message = "联系人座机长度不能超过20个字符")
    private String contactPhone;

    @Schema(description = "电子邮箱", example = "zhangsan@example.com")
    @Email(message = "电子邮箱格式不正确")
    @Size(max = 100, message = "电子邮箱长度不能超过100个字符")
    private String email;

    @Schema(description = "统一社会信用代码/身份证", example = "91330400MA2XXXXX1")
    @Size(max = 50, message = "统一社会信用代码/身份证长度不能超过50个字符")
    private String creditCodeOrId;

    @Schema(description = "业务负责人列表", example = "[\"张经理\", \"李专员\"]")
    private List<String> businessManagers;

    @Schema(description = "备注", example = "VIP客户")
    @Size(max = 500, message = "备注长度不能超过500个字符")
    private String remark;

    @Schema(description = "纳税人识别号", example = "91330400MA2XXXXX1")
    @Size(max = 50, message = "纳税人识别号长度不能超过50个字符")
    private String taxId;

    @Schema(description = "发票地址", example = "浙江省嘉兴市南湖区科技大道1号")
    @Size(max = 255, message = "发票地址长度不能超过255个字符")
    private String invoiceAddress;

    @Schema(description = "发票电话", example = "0571-88888888")
    @Size(max = 20, message = "发票电话长度不能超过20个字符")
    private String invoicePhone;

    @Schema(description = "银行账号", example = "6222021234567890123")
    @Size(max = 50, message = "银行账号长度不能超过50个字符")
    private String account;

    @Schema(description = "开户行", example = "中国工商银行嘉兴分行")
    @Size(max = 100, message = "开户行长度不能超过100个字符")
    private String openingBank;

    @Schema(description = "邮寄地址", example = "浙江省嘉兴市南湖区科技大道1号")
    @Size(max = 255, message = "邮寄地址长度不能超过255个字符")
    private String mailingAddress;

}
