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;

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

    @NotBlank(message = "业务编号不能为空")
    @Schema(description = "业务编号（唯一）", requiredMode = Schema.RequiredMode.REQUIRED)
    private String navCode;

    @NotBlank(message = "名称不能为空")
    @Schema(description = "展示名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String title;

    @Schema(description = "图标 URL")
    private String iconUrl;

    @NotBlank(message = "跳转路径不能为空")
    @Schema(description = "小程序页面路径，须以 / 开头；列表模式一般为介绍列表页并带 gridId", requiredMode = Schema.RequiredMode.REQUIRED)
    private String linkPath;

    /**
     * 见 {@link com.jeesharp.business.modules.setting.enums.HomeQuickGridIntroJumpTypeEnum}
     */
    @Schema(description = "宫格介绍跳转：1-介绍列表 2-介绍详情")
    private Integer introJumpType;

    @Schema(description = "详情模式：小程序详情页完整路径（须以 / 开头）")
    private String introDetailLinkPath;

    @Schema(description = "详情模式：绑定介绍文章主键")
    private String introDetailArticleId;

    @Schema(description = "介绍列表布局：0-大图卡片 … 10-动感频道页")
    private Integer introListLayout;

    @Schema(description = "频道布局顶部轮播 JSON 数组")
    private String introBannerJson;

    @Schema(description = "频道布局 Tab 标签 JSON 数组")
    private String introTabLabels;

    @Schema(description = "排序号（越大越靠前）")
    private Integer sortOrder;

    @Schema(description = "状态：0-禁用 1-启用")
    private Integer status;
}
