package com.gxwebsoft.common.system.param;

import com.fasterxml.jackson.annotation.JsonInclude;
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 io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * 购物车查询参数
 *
 * @author 科技小王子
 * @since 2024-10-26 10:54:51
 */
@Data
@EqualsAndHashCode(callSuper = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
@Schema(name = "CartParam对象", description = "购物车查询参数")
public class CartParam extends BaseParam {
    private static final long serialVersionUID = 1L;

    @Schema(description = "购物车表ID")
    @QueryField(type = QueryType.EQ)
    private Long id;

    @Schema(description = "类型 0商城 1应用插件")
    @QueryField(type = QueryType.EQ)
    private Integer type;

    @Schema(description = "唯一标识")
    private String code;

    @Schema(description = "项目ID，0 goodId 1 companyId")
    private Long itemId;

    @Schema(description = "商品规格")
    private String spec;

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

    @Schema(description = "商品数量")
    @QueryField(type = QueryType.EQ)
    private Integer cartNum;

    @Schema(description = "单商品合计")
    @QueryField(type = QueryType.EQ)
    private BigDecimal totalPrice;

    @Schema(description = "0 = 未购买 1 = 已购买")
    @QueryField(type = QueryType.EQ)
    private Boolean isPay;

    @Schema(description = "是否为立即购买")
    @QueryField(type = QueryType.EQ)
    private Boolean isNew;

    @Schema(description = "拼团id")
    @QueryField(type = QueryType.EQ)
    private Integer combinationId;

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

    @Schema(description = "砍价id")
    @QueryField(type = QueryType.EQ)
    private Integer bargainId;

    @Schema(description = "是否选中")
    @QueryField(type = QueryType.EQ)
    private Boolean selected;

    @Schema(description = "商户ID")
    private Long merchantId;

    @Schema(description = "用户ID")
    private Long userId;

}
