43 lines
1.3 KiB
Java
43 lines
1.3 KiB
Java
package com.baiyue.warehouse.dto;
|
|
|
|
import jakarta.validation.Valid;
|
|
import jakarta.validation.constraints.NotBlank;
|
|
import jakarta.validation.constraints.NotEmpty;
|
|
import jakarta.validation.constraints.Positive;
|
|
import jakarta.validation.constraints.Size;
|
|
|
|
import java.util.List;
|
|
|
|
public final class WarehousePalletBatchRequests {
|
|
private WarehousePalletBatchRequests() { }
|
|
|
|
public record EnsureReserved(
|
|
@Positive long warehouseId,
|
|
@NotBlank @Size(max = 160) String batchKey,
|
|
@NotEmpty @Size(max = 200) List<@Valid Item> items
|
|
) { }
|
|
|
|
public record Item(
|
|
@Positive long customerId,
|
|
@NotBlank @Size(max = 100) String businessKey,
|
|
@NotBlank @Size(max = 128) String inboundPlanNo,
|
|
@Positive int sequenceNo,
|
|
@NotBlank @Size(max = 32) String palletType,
|
|
@Size(max = 128) String fbaWarehouseCode,
|
|
@Size(max = 128) String palletCode
|
|
) { }
|
|
|
|
public record Confirm(
|
|
@Positive long warehouseId,
|
|
@NotBlank @Size(max = 160) String batchKey,
|
|
@NotBlank @Size(max = 160) String commandKey
|
|
) { }
|
|
|
|
public record Compensate(
|
|
@Positive long warehouseId,
|
|
@NotBlank @Size(max = 160) String batchKey,
|
|
@NotBlank @Size(max = 160) String commandKey,
|
|
@NotBlank @Size(max = 500) String reason
|
|
) { }
|
|
}
|