package com.gxwebsoft.shop.param;

import java.math.BigDecimal;
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 io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 商品查询参数
 *
 * @author 科技小王子
 * @since 2025-04-24 20:52:13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
@Schema(name = "ShopGoodsParam对象", description = "商品查询参数")
public class ShopGoodsParam extends BaseParam {
    private static final long serialVersionUID = 1L;

    @Schema(description = "自增ID")
    @QueryField(type = QueryType.EQ)
    private Integer goodsId;

    @Schema(description = "商品名称")
    private String name;

    @Schema(description = "产品编码")
    private String code;

    @Schema(description = "类型 0软件产品 1实物商品 2虚拟商品")
    @QueryField(type = QueryType.EQ)
    private Integer type;

    @Schema(description = "封面图")
    private String image;

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

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

    @Schema(description = "路由地址")
    private String path;

    @Schema(description = "标签")
    private String tag;

    @Schema(description = "产品规格 0单规格 1多规格")
    @QueryField(type = QueryType.EQ)
    private Integer specs;

    @Schema(description = "货架")
    private String position;

    @Schema(description = "单位名称 (个)")
    private String unitName;

    @Schema(description = "商品价格")
    @QueryField(type = QueryType.EQ)
    private BigDecimal price;

    @Schema(description = "进货价格")
    @QueryField(type = QueryType.EQ)
    private BigDecimal buyingPrice;

    @Schema(description = "经销商价格")
    @QueryField(type = QueryType.EQ)
    private BigDecimal dealerPrice;

    @Schema(description = "库存计算方式(10下单减库存 20付款减库存)")
    @QueryField(type = QueryType.EQ)
    private Integer deductStockType;

    @Schema(description = "交付方式(0不启用)")
    @QueryField(type = QueryType.EQ)
    private Integer deliveryMethod;

    @Schema(description = "购买时长(0不启用，1 一次性，2 按时长)")
    @QueryField(type = QueryType.EQ)
    private Integer durationMethod;

    @Schema(description = "可购买数量")
    @QueryField(type = QueryType.EQ)
    private Integer canBuyNumber;

    @Schema(description = "轮播图")
    private String files;

    @Schema(description = "销量")
    @QueryField(type = QueryType.EQ)
    private Integer sales;

    @Schema(description = "库存")
    @QueryField(type = QueryType.EQ)
    private Integer stock;

    @Schema(description = "安装次数")
    @QueryField(type = QueryType.EQ)
    private Integer install;

    @Schema(description = "评分")
    @QueryField(type = QueryType.EQ)
    private BigDecimal rate;

    @Schema(description = "消费赚取积分")
    @QueryField(type = QueryType.EQ)
    private BigDecimal gainIntegral;

    @Schema(description = "推荐")
    @QueryField(type = QueryType.EQ)
    private Integer recommend;

    @Schema(description = "是否官方")
    @QueryField(type = QueryType.EQ)
    private Integer official;

    @Schema(description = "商户ID")
    @QueryField(type = QueryType.EQ)
    private Long merchantId;

    @Schema(description = "是否展示")
    @QueryField(type = QueryType.EQ)
    private Boolean isShow;

    @Schema(description = "状态, 0上架 1待上架 2待审核 3审核不通过")
    @QueryField(type = QueryType.EQ)
    private Integer status;

    @Schema(description = "备注")
    private String comments;

    @Schema(description = "排序号")
    @QueryField(type = QueryType.EQ)
    private Integer sortNumber;

    @Schema(description = "用户ID")
    @QueryField(type = QueryType.EQ)
    private Integer userId;

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

}
