package com.zsElectric.boot.charging.dto;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import lombok.experimental.Accessors;


@Data
@Accessors(chain = true)
@Schema(description = "请求启动充电DTO")
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE)
public class StartChargingRequestDTO {

    @NotBlank(message = "充电订单号不能为空")
    @Pattern(regexp = "^\\d{27}$", message = "充电订单号必须为27位数字")
    @Schema(description = "充电订单号(格式:运营商ID+唯一编号,27位)",
            example = "123456789201805071630123456",
            required = true)
    @JsonProperty("StartChargeSeq")
    private String StartChargeSeq;

    @NotBlank(message = "充电设备接口编码不能为空")
    @Schema(description = "充电设备接口编码(见中电联协议 102.2-2016)",
            example = "3702120244102_1",
            required = true)
    @JsonProperty("ConnectorID")
    private String ConnectorID;

    @Schema(description = "手机号(平台扩展字段)",
            example = "13800138000")
    @JsonProperty("PhoneNum")
    private String PhoneNum;

    @Schema(description = "车牌号(平台扩展字段)",
            example = "京A12345")
    @JsonProperty("PlateNum")
    private String PlateNum;

    @Schema(description = "预付金额(单位元)(平台扩展字段)",
            example = "50.00")
    @JsonProperty("ChargingAmt")
    private String ChargingAmt;

    @Schema(description = "二维码其他信息(二维码中含有自定义部分的,需要将二维码自定义部分的原文传输)",
            example = "custom_qr_info_123456")
    @JsonProperty("QRCode")
    private String QRCode;
}