package com.gxwebsoft.cms.param;

import com.gxwebsoft.common.core.annotation.QueryField;
import com.gxwebsoft.common.core.annotation.QueryType;
import com.gxwebsoft.common.core.web.BaseParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 产品查询参数
 *
 * @author WorkBuddy
 * @since 2026-07-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "CmsProductParam对象", description = "产品查询参数")
public class CmsProductParam extends BaseParam {
    private static final long serialVersionUID = 1L;

    @Schema(description = "产品ID")
    @QueryField(type = QueryType.EQ)
    private Integer productId;

    @Schema(description = "产品名称")
    @QueryField(type = QueryType.LIKE)
    private String productName;

    @Schema(description = "分类ID")
    @QueryField(type = QueryType.EQ)
    private Integer categoryId;

    @Schema(description = "分类ID集合（逗号分隔），用于聚合父栏目下所有子栏目的产品；优先级高于 categoryId")
    @QueryField(value = "category_id", type = QueryType.IN_STR)
    private String categoryIds;

    @Schema(description = "状态: 1在售 0下架")
    @QueryField(type = QueryType.EQ)
    private Integer status;

    @Schema(description = "计费方式: 1包月 2包年 3一次性 4按量")
    @QueryField(type = QueryType.EQ)
    private Integer chargeType;
}
