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

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

import com.baomidou.mybatisplus.annotation.TableField;
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_banner}。
 *
 * @author jeesharp
 * @since 2026-05-08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("cms_home_banner")
@Schema(description = "首页轮播图")
public class CmsHomeBanner extends BaseEntity<CmsHomeBanner> {

    @Schema(description = "标题/文案")
    private String title;

    @Schema(description = "图片 URL")
    private String imageUrl;

    @Schema(description = "点击跳转链接（自定义路径/H5 或系统组装的缓存路径）")
    private String linkUrl;

    /**
     * 跳转类型，见 {@link com.jeesharp.business.modules.setting.enums.HomeBannerJumpTypeEnum}
     */
    @Schema(description = "跳转类型：0-不跳转 1-业务详情 2-业务列表 3-自定义路径 4-H5")
    private Integer jumpType;

    /**
     * 业务场景，见 {@link com.jeesharp.business.modules.setting.enums.HomeBannerBizTypeEnum}
     */
    @Schema(description = "业务场景编码")
    private String bizType;

    @Schema(description = "业务主键（详情类）")
    private String bizId;

    @Schema(description = "扩展跳转参数 JSON")
    private String linkParamsJson;

    /**
     * 展示端，见 {@link com.jeesharp.business.modules.setting.enums.HomeBannerPlatformEnum}
     */
    @Schema(description = "展示端：ALL/WECHAT_MINI/APP/H5")
    private String platform;

    /**
     * 展示位置，见 {@link com.jeesharp.business.modules.setting.enums.HomeBannerPositionEnum}
     */
    @Schema(description = "展示位置：HOME-首页 MALL-商城")
    @TableField("banner_position")
    private String bannerPosition;

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

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