package com.erp.inventory.dto;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.Builder;

/**
 * 残次品入库请求DTO
 * 对应PHP StockController::defectiveInbound
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class DefectiveInboundRequest {

    /**
     * SKU编码
     */
    @NotBlank(message = "SKU编码不能为空")
    private String skuCode;

    /**
     * 仓库ID
     */
    @NotNull(message = "仓库ID不能为空")
    private Long warehouseId;

    /**
     * 入库数量
     */
    @NotNull(message = "入库数量不能为空")
    @Min(value = 1, message = "入库数量必须大于0")
    private Integer quantity;

    /**
     * 订单ID（可选）
     */
    private Long orderId;

    /**
     * 关联单号（可选）
     */
    private String relatedNo;

    /**
     * 备注（可选）
     */
    private String remark;
}
