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

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;

import java.time.LocalDate;

/**
 * 首页宫格介绍文章实体，映射表 {@code cms_home_grid_intro}；按 {@code quick_grid_id} 归属宫格，正文为富文本 HTML。
 *
 * @author jeesharp
 * @since 2026-05-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("cms_home_grid_intro")
@Schema(description = "首页宫格介绍文章")
public class CmsHomeGridIntro extends BaseEntity<CmsHomeGridIntro> {

    @Schema(description = "首页宫格主键，关联 cms_home_quick_grid.id")
    private String quickGridId;

    @Schema(description = "标题")
    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;

    /**
     * 发布状态，取值与 {@link com.jeesharp.business.modules.setting.enums.TravelNewsStatusEnum} 一致。
     */
    @Schema(description = "状态：0-草稿 1-已发布 2-已下线")
    private Integer status;

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

    /**
     * 详情页布局，取值与 {@link com.jeesharp.business.modules.setting.enums.HomeGridIntroLayoutEnum} 一致。
     */
    @Schema(description = "布局：0-标准模式 1-仅内容展示")
    private Integer layout;
}
