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

import com.fasterxml.jackson.annotation.JsonAlias;
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-08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "首页轮播保存请求")
public class HomeBannerSaveDTO extends BaseSaveDTO {

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

    @NotBlank(message = "图片不能为空")
    @JsonAlias("image")
    @Schema(description = "图片 URL", requiredMode = Schema.RequiredMode.REQUIRED)
    private String imageUrl;

    @Schema(description = "点击跳转链接（jumpType=3/4 时手填；结构化跳转可由服务端回写）")
    private String linkUrl;

    @Schema(description = "跳转类型：0-不跳转 1-业务详情 2-业务列表 3-自定义路径 4-H5")
    private Integer jumpType;

    @Schema(description = "业务场景编码")
    private String bizType;

    @Schema(description = "业务主键")
    private String bizId;

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

    @Schema(description = "展示端：ALL/WECHAT_MINI/APP/H5")
    private String platform;

    @Schema(description = "展示位置：HOME-首页 MALL-商城")
    private String bannerPosition;

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

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