
package com.tmerclub.cloud.product.dto.shopcart;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;

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

/**
 * @author tmerclub
 * @date 2020-11-20 15:47:32
 */
public class ChangeShopCartItemDTO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    @Schema(description = "购物车ID", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long shopCartItemId;

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

    @Schema(description = "旧的skuid 如果传过来说明在变更sku", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long oldSkuId;

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

    @Schema(description = "店铺ID，前端不用传该字段")
    private Long shopId;

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

    @Schema(description = "分销推广人id")
    private Long distributionUserId;

    @Schema(description = "商品是否勾选 true：勾选 ")
    private Boolean isCheck;

    @Schema(description = "满减活动id")
    private Long discountId;

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

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

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

    @Schema(description = "搭配商品skuId")
    private List<Long> matchSkuIdList;

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

    @Schema(description = "是否为主商品（套餐）1 是 -1 搭配商品")
    private Integer isMainProd;

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

    public Integer getComboCount() {
        return comboCount;
    }

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

    public Integer getIsMainProd() {
        return isMainProd;
    }

    public void setIsMainProd(Integer isMainProd) {
        this.isMainProd = isMainProd;
    }

    public Integer getComboMainLeastNum() {
        return comboMainLeastNum;
    }

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

    public List<Long> getMatchSkuIdList() {
        return matchSkuIdList;
    }

    public void setMatchSkuIdList(List<Long> matchSkuIdList) {
        this.matchSkuIdList = matchSkuIdList;
    }

    public Long getParentCartItemId() {
        return parentCartItemId;
    }

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

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

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

    public Long getComboId() {
        return comboId;
    }

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

    public Long getShopCartItemId() {
        return shopCartItemId;
    }

    public void setShopCartItemId(Long shopCartItemId) {
        this.shopCartItemId = shopCartItemId;
    }

    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 Long getShopId() {
        return shopId;
    }

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

    public Integer getCount() {
        return count;
    }

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

    public Long getDistributionUserId() {
        return distributionUserId;
    }

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

    public Boolean getCheck() {
        return isCheck;
    }

    public void setCheck(Boolean check) {
        isCheck = check;
    }

    public Long getOldSkuId() {
        return oldSkuId;
    }

    public void setOldSkuId(Long oldSkuId) {
        this.oldSkuId = oldSkuId;
    }

    public Long getDiscountId() {
        return discountId;
    }

    public void setDiscountId(Long discountId) {
        this.discountId = discountId;
    }

    @Override
    public String toString() {
        return "ChangeShopCartItemDTO{" +
                "shopCartItemId=" + shopCartItemId +
                ", spuId=" + spuId +
                ", oldSkuId=" + oldSkuId +
                ", skuId=" + skuId +
                ", shopId=" + shopId +
                ", count=" + count +
                ", distributionUserId=" + distributionUserId +
                ", isCheck=" + isCheck +
                ", discountId=" + discountId +
                ", comboId=" + comboId +
                ", cartComboMatchSpuDTOS=" + cartComboMatchSpuDTOS +
                ", parentCartItemId=" + parentCartItemId +
                ", matchSkuIdList=" + matchSkuIdList +
                ", comboMainLeastNum=" + comboMainLeastNum +
                ", isMainProd=" + isMainProd +
                ", comboCount=" + comboCount +
                '}';
    }
}
