
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 lombok.Data;
import lombok.ToString;

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

/**
 * @author tmerclub
 * @date 2020-11-20 15:47:32
 */
@Data
@ToString
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;

}
