Files
YschcmsService/src/main/java/com/yunhai/cms/model/dto/BannerSaveRequest.java
T

74 lines
2.1 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package com.yunhai.cms.model.dto;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
/**
* 轮播保存(校验 link_type/link_value,方案 §9.2;docs/20 D-3/D-6 扩展 topic/event 位字段)。
*/
@Data
public class BannerSaveRequest {
/** 修改时必填 */
private Integer id;
@NotNull(message = "siteId 不得为空")
private Integer siteId;
/** 展示位(home=首页轮播) */
@Size(max = 32)
private String position = "home";
@NotBlank(message = "标题不得为空")
@Size(max = 200, message = "标题过长")
private String title;
@NotBlank(message = "图片不得为空")
@Size(max = 500)
private String imageUrl;
/** 1=文章 2=栏目 3=外链 */
@NotNull(message = "跳转类型不得为空")
private Integer linkType;
/** 跳转目标:文章ID/栏目ID/URL(服务端按类型校验必填与存在性) */
@Size(max = 500, message = "跳转目标过长")
private String linkValue;
private Integer sortNo = 0;
/** 上线时间(空=立即) */
private LocalDateTime startTime;
/** 下线时间(可空) */
private LocalDateTime endTime;
/** 0=停用 1=启用 */
private Integer status = 1;
// ===== docs/20 D-3/D-6:topic/event 展示位扩展(仅对应位消费,其余位忽略)=====
/** 专题大卡描述(position=topic) */
@Size(max = 500, message = "专题描述过长")
private String description;
/** 专题大卡 CTA 按钮文字(position=topic) */
@Size(max = 100, message = "按钮文字过长")
private String ctaText;
/** 专题大卡 CTA 跳转地址(position=topic) */
@Size(max = 500, message = "按钮地址过长")
private String ctaUrl;
/** 活动日期(position=event) */
private LocalDateTime eventDate;
/** 活动地点(position=event) */
@Size(max = 200, message = "活动地点过长")
private String location;
}