wenminjie
2026-08-04 93414e8ee25852aca467213402585d0e65c08a4a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package com.talentcard.server.request;
 
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;
 
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
 
@Schema(name = "后台票包保存请求", description = "后台录入或修改票包信息")
public record TicketPackageSaveRequest(
        @Schema(description = "票包名称", example = "人才观影票包", requiredMode = Schema.RequiredMode.REQUIRED)
        @NotBlank(message = "票包名称不能为空")
        @Size(max = 128, message = "票包名称长度不能超过128")
        String packageName,
 
        @Schema(description = "指定兑换商家ID", example = "1")
        Long merchantId,
 
        @Schema(description = "封面图", example = "/static/entertainment-assets/wanda-cinema.webp")
        @Size(max = 500, message = "封面图长度不能超过500")
        String coverUrl,
 
        @Schema(description = "适用人才卡等级;不传或空数组表示全部", example = "[\"卓越人才卡\",\"杰出人才卡\"]")
        List<String> talentLevels,
 
        @Schema(description = "领取价", example = "0")
        @DecimalMin(value = "0.00", message = "领取价不能小于0")
        BigDecimal claimPrice,
 
        @Schema(description = "单用户周期内限领数量;不传默认1", example = "1")
        @Min(value = 1, message = "单用户限领数量必须大于0")
        Integer perUserLimit,
 
        @Schema(description = "有效开始日期", example = "2026-08-01")
        LocalDate validStart,
 
        @Schema(description = "有效结束日期", example = "2026-12-31")
        LocalDate validEnd,
 
        @Schema(description = "指定商家APP名称", example = "万达电影APP")
        @Size(max = 128, message = "指定商家APP名称长度不能超过128")
        String appName,
 
        @Schema(description = "指定商家APP或H5跳转地址", example = "https://example.com/ticket")
        @Size(max = 500, message = "跳转地址长度不能超过500")
        String appJumpUrl,
 
        @Schema(description = "使用说明", example = "领取兑换码后到指定商家APP中换取电影票")
        @Size(max = 500, message = "使用说明长度不能超过500")
        String usageText,
 
        @Schema(description = "状态:1启用,0停用;不传默认启用", example = "1")
        Integer status,
 
        @Schema(description = "排序号", example = "10")
        Integer sortNo
) {
}