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.NotBlank; import jakarta.validation.constraints.Size; @Schema(name = "展示类服务新增/编辑请求", description = "维护停车、体检、购房、购车、家电、公寓租赁等展示服务的图文介绍、商户联系方式、办理说明、优惠政策、适用卡级和前端展示状态") public record DisplayServiceSaveRequest( @Schema(description = "展示服务名称", example = "东区青年人才公寓", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "展示服务名称不能为空") @Size(max = 128, message = "展示服务名称长度不能超过128") String merchantName, @Schema(description = "服务分类:parking停车、medical体检、housing购房、car购车、appliance家电、apartment公寓租赁", example = "apartment", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "服务分类不能为空") @Size(max = 32, message = "服务分类长度不能超过32") String category, @Schema(description = "商户联系人", example = "人才公寓服务专员") @Size(max = 64, message = "联系人长度不能超过64") String contactName, @Schema(description = "商户联系电话", example = "0812-3509031") @Size(max = 20, message = "联系电话长度不能超过20") String contactMobile, @Schema(description = "商户地址", example = "攀枝花市东区炳三区人才公寓") @Size(max = 255, message = "地址长度不能超过255") String address, @Schema(description = "商户LOGO图片地址") String logoUrl, @Schema(description = "封面图地址(图文介绍主图)", example = "/static/stay-assets/hotel-hampton.jpg") String coverUrl, @Schema(description = "优惠政策标签", example = "人才专享8折") @Size(max = 64, message = "优惠政策标签长度不能超过64") String serviceLabel, @Schema(description = "优惠政策/图文介绍说明", example = "持人才卡到店可按现场规则享受专属优惠。") String rightsText, @Schema(description = "办理说明", example = "持人才卡到店咨询办理,具体流程以现场说明为准。") String handlingInstructions, @Schema(description = "排序值,越大越靠前", example = "100") Integer sortNo, @Schema(description = "前端展示状态:1上架 0下架", example = "1") Integer status, @Schema(description = "是否推荐:1推荐 0不推荐", example = "0") Integer recommend, @Schema(description = "适用人才卡级别政策列表") List<@Valid CardPolicy> cardPolicies ) { @Schema(name = "展示类服务适用人才卡级别政策", description = "按人才卡级别维护优惠政策内容") public record CardPolicy( @Schema(description = "人才卡级别编码:EXCELLENT、OUTSTANDING、ELITE", example = "ELITE", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "人才卡级别不能为空") @Size(max = 32, message = "人才卡级别长度不能超过32") String cardLevel, @Schema(description = "人才卡级别名称", example = "精英人才卡") @Size(max = 64, message = "人才卡级别名称长度不能超过64") String cardName, @Schema(description = "优惠政策内容", example = "持卡到店可享专属优惠") String benefitText, @Schema(description = "展示主题,例如excellent、outstanding、elite", example = "elite") @Size(max = 32, message = "展示主题长度不能超过32") String theme, @Schema(description = "政策排序值,越大越靠前", example = "10") Integer sortNo, @Schema(description = "政策状态:1启用 0停用", example = "1") Integer status ) { } }