package com.zt.plat.module.base.controller.admin.base.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Positive;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

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

@Data
@Schema(description = "主数据同步请求参数")
public class MasterDataSyncReqVO {

    @Schema(description = "增量同步的起始记录时间，留空执行全量")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime since;

    @Schema(description = "拉取批大小，不填写则使用配置默认值")
    @Positive(message = "batchSize 必须为正数")
    private Integer batchSize;

    @Schema(description = "指定要刷新同步的物料编码列表")
    private List<String> materialCodes;

    @Schema(description = "可选的本次同步记录数上限，未填写表示不限制")
    @Positive(message = "recordLimit 必须为正数")
    private Long recordLimit;
}
