优化
This commit is contained in:
+28
-1
@@ -4,7 +4,10 @@ import jakarta.validation.constraints.DecimalMin;
|
||||
import jakarta.validation.constraints.Max;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
import jakarta.validation.constraints.Positive;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@@ -71,7 +74,31 @@ public final class UsTruckOrderRequests {
|
||||
|
||||
public record ChangeStatus(
|
||||
@NotNull @Min(0) Long version,
|
||||
@NotBlank @Size(max = 32) String status,
|
||||
@NotBlank @Pattern(regexp = "CANCELLED") String status,
|
||||
@NotBlank @Size(max = 255) String idempotencyKey,
|
||||
@Size(max = 1000) String remark) {}
|
||||
|
||||
public record Review(
|
||||
@NotNull @Min(0) Long version,
|
||||
@NotBlank @Pattern(regexp = "APPROVE|REJECT") String decision,
|
||||
@NotBlank @Size(max = 255) String idempotencyKey,
|
||||
@Size(max = 1000) String remark) {}
|
||||
|
||||
public record ReviewPalletOverage(
|
||||
@NotNull @Min(0) Long version,
|
||||
@NotBlank @Pattern(regexp = "APPROVE|REJECT") String decision,
|
||||
@NotBlank @Size(max = 255) String idempotencyKey,
|
||||
@Size(max = 1000) String remark) {}
|
||||
|
||||
public record AllocatePallets(
|
||||
@NotNull @Min(0) Long version,
|
||||
@NotEmpty @Size(max = 500) List<@NotNull @Positive Long> palletIds,
|
||||
@NotBlank @Size(max = 255) String idempotencyKey,
|
||||
@Size(max = 1000) String remark) {}
|
||||
|
||||
public record Command(
|
||||
@NotNull @Min(0) Long version,
|
||||
@NotBlank @Size(max = 255) String idempotencyKey,
|
||||
@Size(max = 1000) String remark) {}
|
||||
|
||||
public record ReceivePallets(
|
||||
|
||||
+3
-2
@@ -11,13 +11,14 @@ public final class UsTruckOrderResponses {
|
||||
public record Summary(
|
||||
Long id, String customerId, String orderNo, String transportType,
|
||||
String origin, String destination, String containerType, int palletCount, int packageCount,
|
||||
int receivedPalletCount, int allocatedPalletCount, int shippedPalletCount,
|
||||
int receivedPalletCount, int allocatedPalletCount,
|
||||
BigDecimal totalWeightKg, BigDecimal totalVolumeCbm, BigDecimal budgetAmount,
|
||||
String currency, String contactName, String contactInfo, LocalDate requestedDate,
|
||||
String status, long version, LocalDateTime createdAt, LocalDateTime updatedAt) {}
|
||||
|
||||
public record History(
|
||||
String fromStatus, String toStatus, String operatorId, String remark, LocalDateTime createdAt) {}
|
||||
String operationType, String fromStatus, String toStatus, String operatorId,
|
||||
String idempotencyKey, String remark, LocalDateTime createdAt) {}
|
||||
|
||||
public record Pallet(Long id, String palletNo, int sequenceNo, String source, String status,
|
||||
Long warehousePalletId, Integer packageCount, LocalDateTime receivedAt) {}
|
||||
|
||||
Reference in New Issue
Block a user