package com.jeesharp.business.modules.setting.dto;

import com.jeesharp.framework.pojo.dto.BaseSaveDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDate;

/**
 * 首页宫格介绍文章保存请求（后台新增/修改）。
 *
 * @author jeesharp
 * @since 2026-05-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "宫格介绍文章保存请求")
public class HomeGridIntroSaveDTO extends BaseSaveDTO {

    @NotBlank(message = "所属宫格不能为空")
    @Schema(description = "首页宫格主键 cms_home_quick_grid.id", requiredMode = Schema.RequiredMode.REQUIRED)
    private String quickGridId;

    @NotBlank(message = "标题不能为空")
    @Schema(description = "标题", requiredMode = Schema.RequiredMode.REQUIRED)
    private String title;

    @Schema(description = "摘要")
    private String summary;

    @Schema(description = "分类（频道布局 Tab 筛选）")
    private String category;

    @Schema(description = "标签 JSON 数组")
    private String tagsJson;

    @Schema(description = "封面图URL")
    private String coverImage;

    @Schema(description = "图片集（JSON数组，详情页轮播）")
    private String imagesJson;

    @Schema(description = "正文（富文本 HTML）")
    private String content;

    @Schema(description = "发布日期")
    private LocalDate publishDate;

    @Schema(description = "状态：0-草稿 1-已发布 2-已下线")
    private Integer status;

    @Schema(description = "排序号")
    private Integer sortNo;

    @Schema(description = "布局：0-标准模式 1-仅内容展示")
    private Integer layout;
}
