package org.dromara.zhishu.domain.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

import java.util.Date;

@Data
@Schema(description = "波次明细插入DTO")
public class WaveDetailInsertDto {
    /**
     * ISBN 号码
     * 示例: "9787111636628"
     */
    @NotBlank(message = "ISBN不能为空")
    @Schema(description = "ISBN号码", example = "9787111636628")
    private String isbn;

    /**
     * 扫描时间字符串
     * 格式: "yyyy/MM/dd HH:mm"
     * 示例: "2024/01/15 14:30"
     */
    @NotBlank(message = "扫描时间不能为空")
    @Pattern(regexp = "\\d{4}/\\d{2}/\\d{2} \\d{2}:\\d{2}",
            message = "时间格式应为 yyyy/MM/dd HH:mm")
    @Schema(description = "扫描时间，格式为 yyyy/MM/dd HH:mm",
            example = "2024/01/15 14:30")
    private String time;

    /**
     * 转换后的时间对象
     * （可选，根据业务需要）
     */
    @Schema(description = "转换后的扫描时间对象")
    private Date scanTime;
}