package com.gxwebsoft.cms.param;

import com.baomidou.mybatisplus.annotation.TableField;
import com.gxwebsoft.common.core.annotation.QueryField;
import com.gxwebsoft.common.core.annotation.QueryType;
import com.gxwebsoft.common.core.web.BaseParam;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 单页查询参数
 *
 * @author WorkBuddy
 * @since 2026-07-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
@Schema(name = "CmsPageParam对象", description = "单页查询参数")
public class CmsPageParam extends BaseParam {
    private static final long serialVersionUID = 1L;

    @Schema(description = "单页ID")
    @QueryField(type = QueryType.EQ)
    private Integer pageId;

    @Schema(description = "页面标题")
    @QueryField(type = QueryType.LIKE)
    private String title;

    @Schema(description = "访问路径(slug)")
    @QueryField(type = QueryType.EQ)
    private String path;

    @Schema(description = "模板标识")
    @QueryField(type = QueryType.EQ)
    private String template;

    @Schema(description = "状态 0草稿 1已发布 2已下线")
    @QueryField(type = QueryType.EQ)
    private Integer status;

    @Schema(description = "是否删除, 0否, 1是")
    @QueryField(type = QueryType.EQ)
    private Integer deleted;

    @Schema(description = "单页ID集查询")
    @TableField(exist = false)
    private java.util.Set<Integer> pageIds;

    @Schema(description = "关联的导航栏目ID（cms_navigation.navigation_id），用于按导航过滤单页")
    @TableField(exist = false)
    @QueryField(type = QueryType.EQ)
    private Integer navigationId;

    @Schema(description = "导航栏目ID集(逗号分隔)，用于父栏目聚合查询其下所有子栏目的单页")
    @TableField(exist = false)
    private String navigationIdsStr;
}
