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 jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 帮助文章保存DTO
 *
 * @author jeesharp
 * @version 2026-02-05
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "帮助文章保存请求")
public class HelpArticleSaveDTO extends BaseSaveDTO {

    /**
     * 应用标识（APP/WECHAT_MINI/WECHAT_MP/H5等）
     */
    @NotBlank(message = "应用标识不能为空")
    @Schema(description = "应用标识（APP/WECHAT_MINI/WECHAT_MP/H5等）", requiredMode = Schema.RequiredMode.REQUIRED)
    private String app;

    /**
     * 分类ID
     */
    @NotBlank(message = "分类ID不能为空")
    @Schema(description = "分类ID", requiredMode = Schema.RequiredMode.REQUIRED)
    private String categoryId;

    /**
     * 文章标题
     */
    @NotBlank(message = "文章标题不能为空")
    @Size(max = 200, message = "文章标题长度不能超过200个字符")
    @Schema(description = "文章标题", requiredMode = Schema.RequiredMode.REQUIRED)
    private String title;

    /**
     * 文章内容（支持富文本）
     */
    @Schema(description = "文章内容（支持富文本）")
    private String content;

    /**
     * 文章摘要
     */
    @Size(max = 500, message = "文章摘要长度不能超过500个字符")
    @Schema(description = "文章摘要")
    private String summary;

    /**
     * 封面图片
     */
    @Schema(description = "封面图片")
    private String coverImage;

    /**
     * 是否常见问题：0-否 1-是
     */
    @Schema(description = "是否常见问题：0-否 1-是")
    private Integer isFaq;

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

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