package com.gxwebsoft.shop.param;

import java.math.BigDecimal;
import java.util.Set;

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 com.gxwebsoft.common.system.entity.User;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 商品记录表查询参数
 *
 * @author 科技小王子
 * @since 2024-07-25 19:22:01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel(value = "GoodsParam对象", description = "商品记录表查询参数")
public class GoodsParam extends BaseParam {
    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty(value = "类型 1实物商品 2虚拟商品")
    @QueryField(type = QueryType.EQ)
    private Integer type;

    @ApiModelProperty(value = "商品编码")
    private String code;

    @ApiModelProperty(value = "商品标题")
    private String goodsName;

    @ApiModelProperty(value = "商品封面图")
    private String image;

    @ApiModelProperty(value = "商品详情")
    private String content;

    @ApiModelProperty(value = "商品分类ID")
    @QueryField(type = QueryType.EQ)
    private Integer categoryId;

    @ApiModelProperty(value = "一级分类")
    private String categoryParent;

    @ApiModelProperty(value = "二级分类")
    private String categoryChildren;

    @ApiModelProperty(value = "商品规格 0单规格 1多规格")
    @QueryField(type = QueryType.EQ)
    private Integer specs;

    @ApiModelProperty(value = "货架")
    private String position;

    @ApiModelProperty(value = "进货价格")
    @QueryField(type = QueryType.EQ)
    private BigDecimal price;

    @ApiModelProperty(value = "销售价格")
    @QueryField(type = QueryType.EQ)
    private BigDecimal salePrice;

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

    @ApiModelProperty(value = "封面图")
    private String files;

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

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

    @ApiModelProperty(value = "商品重量")
    @QueryField(type = QueryType.EQ)
    private Integer goodsWeight;

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

    @ApiModelProperty(value = "商户ID")
    @QueryField(type = QueryType.EQ)
    private Integer merchantId;

    @ApiModelProperty(value = "商户名称")
    private String merchantName;

    @ApiModelProperty(value = "状态（0：未上架，1：上架）")
    @QueryField(type = QueryType.EQ)
    private Integer isShow;

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

    @ApiModelProperty(value = "备注")
    private String comments;

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

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

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

    @ApiModelProperty(value = "父级分类ID")
    @TableField(exist = false)
    private Integer parentId;

    @ApiModelProperty(value = "行业分类")
    @TableField(exist = false)
    private String industryName;

    @ApiModelProperty(value = "分类名称")
    @QueryField(type = QueryType.LIKE)
    private String categoryName;

    @ApiModelProperty(value = "按店铺ID集合查询")
    @TableField(exist = false)
    private Set<Integer> shopIdsByIndustry;

    @ApiModelProperty(value = "当前登录用户")
    @TableField(exist = false)
    private User loginUser;

}
