提交
This commit is contained in:
+35
@@ -0,0 +1,35 @@
|
||||
package com.baiyue.lastleg.customervisit.dto;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.Max;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
public final class CustomerVisitRequests {
|
||||
private CustomerVisitRequests() { }
|
||||
|
||||
public record Query(@Min(1) long page, @Min(1) @Max(200) long size,
|
||||
String keyword, String status, String customerId,
|
||||
LocalDateTime completedFrom, LocalDateTime completedTo) {
|
||||
public Query { if (page == 0) page = 1; if (size == 0) size = 20; }
|
||||
}
|
||||
|
||||
public record Save(@NotNull Long selectedInboundOrderId,
|
||||
@NotBlank @Size(max = 32) String visitResult,
|
||||
@Size(max = 2000) String customerFeedback,
|
||||
@Size(max = 1000) String remark,
|
||||
@Valid @Size(max = 20) List<Attachment> attachments) { }
|
||||
|
||||
public record Attachment(@NotNull Long fileId,
|
||||
@NotBlank @Size(max = 255) String fileName,
|
||||
@Size(max = 128) String contentType,
|
||||
@NotNull @Min(0) Long sizeBytes) { }
|
||||
|
||||
public record DeliveryStatus(@NotBlank @Size(max = 32) String status,
|
||||
@Size(max = 500) String remark) { }
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.baiyue.lastleg.customervisit.dto;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
public final class CustomerVisitResponses {
|
||||
private CustomerVisitResponses() { }
|
||||
|
||||
public record Row(Long id, String customerId, String deliveryNo, String customerName,
|
||||
String contactName, String contactPhone, String destination,
|
||||
LocalDateTime deliveryCompletedAt, String status,
|
||||
String selectedInboundCode, String visitResult, LocalDateTime visitedAt,
|
||||
int visitCount, List<Attachment> attachments) { }
|
||||
|
||||
public record Page(List<Row> records, long current, long size, long total, long pages,
|
||||
long visitable, long pending, long completed) { }
|
||||
|
||||
public record InboundOption(Long inboundOrderId, String inboundCode, Long lastMileOrderId,
|
||||
String lastMileOrderNo, String destinationWarehouseCode,
|
||||
String destinationWarehouseName, int packageCount) { }
|
||||
|
||||
public record Attachment(Long fileId, String fileName, String contentType, long sizeBytes) { }
|
||||
|
||||
public record Detail(Row visit, List<InboundOption> inboundOrders,
|
||||
String customerFeedback, String remark, String visitedBy) { }
|
||||
|
||||
public record UploadedFile(Long fileId, String fileName, String contentType, long sizeBytes) { }
|
||||
|
||||
public record Completed(Long visitId, String deliveryNo, String deliveryStatus,
|
||||
String visitStatus, boolean replayed) { }
|
||||
}
|
||||
Reference in New Issue
Block a user