package com.dora.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Min;

/**
 * 更新Banner图DTO
 */
@Data
@Schema(description = "更新Banner图请求")
public class BannerUpdateDto {
    
    @NotNull(message = "Banner ID不能为空")
    @Schema(description = "Banner ID", example = "1")
    private Long id;
    
    @NotBlank(message = "图片URL不能为空")
    @Schema(description = "图片URL", example = "https://example.com/banner.jpg")
    private String image;
    
    @NotBlank(message = "标题不能为空")
    @Schema(description = "标题", example = "创作计划")
    private String title;
    
    @Schema(description = "描述", example = "创作者计划详情")
    private String description;
    
    @Schema(description = "按钮文字", example = "立即查看")
    private String buttonText;
    
    @Pattern(regexp = "^(internal|external)$", message = "链接类型只能是internal或external")
    @Schema(description = "链接类型(internal: 内部路由跳转, external: 外部链接跳转)", example = "external")
    private String linkType;
    
    @Schema(description = "跳转链接", example = "https://example.com")
    private String link;
    
    @Min(value = 0, message = "排序值不能小于0")
    @Schema(description = "排序字段", example = "1")
    private Integer sortOrder;
    
    @Schema(description = "是否启用", example = "true")
    private Boolean isEnabled;
}
