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

/**
 * 隐私政策/法律文档保存 DTO。
 *
 * @author jeesharp
 * @since 2026-05-20
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "隐私政策保存请求")
public class PrivacyPolicySaveDTO extends BaseSaveDTO {

    @NotBlank(message = "文档编号不能为空")
    @Size(max = 64, message = "文档编号长度不能超过64个字符")
    @Pattern(regexp = "^[A-Za-z0-9_]+$", message = "文档编号仅支持字母、数字与下划线")
    @Schema(description = "文档编号（唯一，如 PRIVACY、SERVICE）", requiredMode = Schema.RequiredMode.REQUIRED)
    private String docCode;

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

    @Schema(description = "内容（富文本 HTML）")
    private String content;

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