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

import com.mzt.logapi.starter.annotation.DiffLogField;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.agt.module.license.framework.operatelog.core.CustomerAreaParseFunction;
import org.agt.module.license.framework.operatelog.core.CustomerTypeParseFunction;

@Schema(description = "管理后台 - 客户新增/修改 Request VO")
@Data
public class CustomerSaveReqVO {

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

    @Schema(description = "客户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
    @NotEmpty(message = "客户名称不能为空")
    @DiffLogField(name = "客户名称")
    private String name;

    @Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2000")
    @NotEmpty(message = "客户编号不能为空")
    @DiffLogField(name = "客户编号")
    private String code;

    @Schema(description = "客户类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "客户类型不能为空")
    @DiffLogField(name = "客户类型", function = CustomerTypeParseFunction.NAME)
    private Integer type;

    @Schema(description = "地区", requiredMode = Schema.RequiredMode.REQUIRED, example = "5186")
    @NotNull(message = "地区不能为空")
    @DiffLogField(name = "地区", function = CustomerAreaParseFunction.NAME)
    private Long areaId;

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

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

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

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

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

}