FulfillmentRequest.java
package com.fulfilment.application.monolith.fulfillment.dto;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Positive;
import jakarta.validation.constraints.Size;
/** Inbound DTO for creating a fulfillment assignment. */
public class FulfillmentRequest {
@NotNull(message = "Store ID must not be null")
@Positive(message = "Store ID must be a positive number")
public Long storeId;
@NotNull(message = "Product ID must not be null")
@Positive(message = "Product ID must be a positive number")
public Long productId;
@NotBlank(message = "Warehouse code must not be blank")
@Size(max = 20, message = "Warehouse code must not exceed 20 characters")
@Pattern(
regexp = "^[A-Z0-9.\\-_]+$",
message = "Warehouse code may only contain uppercase letters, digits, dots, hyphens, and underscores")
public String warehouseCode;
}