package com.tashow.cloud.productapi.api.product.vo.productorderlimit;

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

import java.time.LocalDateTime;

@Schema(description = "管理后台 - 商品接单上限设置新增/修改 Request VO")
@Data
public class ProductOrderLimitSaveReqVO {

    @Schema(description = "接单上限配置的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "10334")
    private Long id;

    @Schema(description = "关联的商品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10171")
    @NotNull(message = "关联的商品ID不能为空")
    private Long prodId;

    @Schema(description = "限制单位'0:按自然天',1:'按自然周',2:'按自然月'", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "限制单位'0:按自然天',1:'按自然周',2:'按自然月'不能为空")
    private Boolean limitUnit;

    @Schema(description = "上限阈值", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "上限阈值不能为空")
    private Integer maxOrders;

    @Schema(description = "配置创建时间")
    private LocalDateTime createdAt;

    @Schema(description = "配置最后更新时间")
    private LocalDateTime updatedAt;

}