package com.snack.server.module.product.dto.req;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;

/**
 * 商品分页查询请求
 */
@Data
@Schema(description = "商品分页查询")
public class ProductPageReq implements Serializable {

    @Schema(description = "页码", example = "1")
    private Long current = 1L;

    @Schema(description = "每页条数", example = "10")
    private Long size = 10L;

    @Schema(description = "关键字（商品名 / 品牌）")
    private String keyword;

    @Schema(description = "分类 ID（查该分类及其子分类下的商品）")
    private Long categoryId;

    @Schema(description = "状态：0-下架 1-上架")
    private Integer status;

    @Schema(description = "是否热门")
    private Integer isHot;

    @Schema(description = "是否新品")
    private Integer isNew;

    @Schema(description = "排序：sales_desc / price_asc / price_desc / create_desc")
    private String orderBy = "create_desc";
}
