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

import com.jeesharp.business.modules.common.enums.DisabledEnabledEnum;

import com.baomidou.mybatisplus.annotation.TableName;
import com.jeesharp.framework.mybatis.core.dataobject.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 小程序首页快捷宫格实体，映射表 {@code cms_home_quick_grid}；启用项按排序取前 8 条注入壳层 {@code quickNav}。
 *
 * @author jeesharp
 * @since 2026-05-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("cms_home_quick_grid")
@Schema(description = "小程序首页快捷宫格")
public class CmsHomeQuickGrid extends BaseEntity<CmsHomeQuickGrid> {

    @Schema(description = "业务编号（唯一）")
    private String navCode;

    @Schema(description = "展示名称")
    private String title;

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

    @Schema(description = "小程序页面路径，须以 / 开头")
    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 = "详情模式：绑定介绍文章主键 cms_home_grid_intro.id")
    private String introDetailArticleId;

    /**
     * 介绍列表页布局，见 {@link com.jeesharp.business.modules.setting.enums.HomeQuickGridIntroListLayoutEnum}
     */
    @Schema(description = "介绍列表布局：0-大图卡片 … 10-动感频道页")
    private Integer introListLayout;

    @Schema(description = "频道布局顶部轮播 JSON 数组 [{imageUrl,title?,linkUrl?}]")
    private String introBannerJson;

    @Schema(description = "频道布局 Tab 标签 JSON 数组，空则按文章分类自动生成")
    private String introTabLabels;

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

    /**
     * 状态，见 {@link com.jeesharp.business.modules.setting.enums.DisabledEnabledEnum}
     */
    @Schema(description = "状态：0-禁用 1-启用")
    private Integer status;
}
