package com.talentcard.server.request; import java.util.List; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; import jakarta.validation.constraints.Size; @Schema(description = "商户展示类优惠政策保存请求") public record MerchantDisplayPolicySaveRequest( @Schema(description = "联系人姓名") @Size(max = 64, message = "联系人姓名不能超过64个字符") String contactName, @Schema(description = "联系电话") @Size(max = 20, message = "联系电话不能超过20个字符") String contactMobile, @Schema(description = "商户统一权益说明") String rightsText, @Schema(description = "办理说明") String handlingInstructions, @Schema(description = "排序值,越大越靠前") Integer sortNo, @Schema(description = "上下架状态:1上架,0下架") Integer status, @Schema(description = "按人才卡类型配置的优惠政策") List<@Valid CardPolicy> cardPolicies ) { @Schema(description = "单个人才卡类型优惠政策") public record CardPolicy( @Schema(description = "人才卡类型编码,例如 EXCELLENT、OUTSTANDING、ELITE") @Size(max = 32, message = "人才卡类型不能超过32个字符") String cardLevel, @Schema(description = "人才卡类型名称,例如 卓越人才卡") @Size(max = 64, message = "人才卡类型名称不能超过64个字符") String cardName, @Schema(description = "优惠政策内容") String benefitText, @Schema(description = "展示主题,例如 excellent、outstanding、elite") @Size(max = 32, message = "展示主题不能超过32个字符") String theme, @Schema(description = "排序值,越大越靠前") Integer sortNo, @Schema(description = "政策状态:1启用,0停用") Integer status ) { } }