1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.talentcard.server.request;
 
import java.util.List;
 
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Size;
 
@Schema(name = "后台票包兑换码导入请求", description = "后台向票包码池批量导入兑换码")
public record TicketPackageCodeImportRequest(
        @Schema(description = "导入批次号;不传后端自动生成", example = "BATCH202608040001")
        @Size(max = 64, message = "导入批次号长度不能超过64")
        String batchNo,
 
        @Schema(description = "兑换码列表", example = "[\"ABC123\",\"DEF456\"]", requiredMode = Schema.RequiredMode.REQUIRED)
        @NotEmpty(message = "兑换码列表不能为空")
        @Size(max = 5000, message = "单次最多导入5000个兑换码")
        List<@Size(max = 128, message = "兑换码长度不能超过128") String> codes,
 
        @Schema(description = "备注", example = "8月第一批码池")
        @Size(max = 500, message = "备注长度不能超过500")
        String remark
) {
}