
package com.tmerclub.cloud.common.order.dto;

import com.tmerclub.cloud.common.product.dto.CartComboMatchSpuDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * 购物车物品参数
 *
 * @author tmerclub
 * @date 2020-12-04 11:27:35
 */
public class ShopCartItemDTO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    @NotNull(message = "产品ID不能为空")
    @Schema(description = "产品ID", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long spuId;

    @NotNull(message = "skuId不能为空")
    @Schema(description = "skuId", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long skuId;

    @Schema(description = "库存点id 自提：自提点id， 其他：仓库id", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long stockPointId;

    @NotNull(message = "商品数量不能为空")
    @Min(value = 1, message = "商品数量不能为空")
    @Schema(description = "商品数量", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer count;

    @NotNull(message = "店铺id不能为空")
    @Schema(description = "店铺id", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long shopId;

    @Schema(description = "推广员用户id")
    private Long distributionUserId;

    @Schema(description = "套餐id")
    private Long comboId;

    @Schema(description = "套餐数量")
    private Integer comboCount;

    @Schema(description = "主购物车id（套餐）")
    private Integer parentCartItemId;

    @Schema(description = "搭配商品Sku id列表")
    private List<CartComboMatchSpuDTO> cartComboMatchSpuDTOS;

    @Schema(description = "主商品起搭数量")
    private Integer comboMainLeastNum;

    public Integer getComboMainLeastNum() {
        return comboMainLeastNum;
    }

    public void setComboMainLeastNum(Integer comboMainLeastNum) {
        this.comboMainLeastNum = comboMainLeastNum;
    }

    public List<CartComboMatchSpuDTO> getCartComboMatchSpuDTOS() {
        return cartComboMatchSpuDTOS;
    }

    public void setCartComboMatchSpuDTOS(List<CartComboMatchSpuDTO> matchingSkuIds) {
        this.cartComboMatchSpuDTOS = matchingSkuIds;
    }

    public Long getComboId() {
        return comboId;
    }

    public void setComboId(Long comboId) {
        this.comboId = comboId;
    }

    public Integer getComboCount() {
        return comboCount;
    }

    public void setComboCount(Integer comboCount) {
        this.comboCount = comboCount;
    }

    public Integer getParentCartItemId() {
        return parentCartItemId;
    }

    public void setParentCartItemId(Integer parentCartItemId) {
        this.parentCartItemId = parentCartItemId;
    }

    public Long getSpuId() {
        return spuId;
    }

    public void setSpuId(Long spuId) {
        this.spuId = spuId;
    }

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public Long getDistributionUserId() {
        return distributionUserId;
    }

    public void setDistributionUserId(Long distributionUserId) {
        this.distributionUserId = distributionUserId;
    }

    public Long getStockPointId() {
        return stockPointId;
    }

    public void setStockPointId(Long stockPointId) {
        this.stockPointId = stockPointId;
    }

    @Override
    public String toString() {
        return "ShopCartItemDTO{" +
                "spuId=" + spuId +
                ", skuId=" + skuId +
                ", stockPointId=" + stockPointId +
                ", count=" + count +
                ", shopId=" + shopId +
                ", distributionUserId=" + distributionUserId +
                ", comboId=" + comboId +
                ", comboCount=" + comboCount +
                ", parentCartItemId=" + parentCartItemId +
                ", cartComboMatchSpuDTOS=" + cartComboMatchSpuDTOS +
                ", comboMainLeastNum=" + comboMainLeastNum +
                '}';
    }
}
