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

import com.tmerclub.cloud.common.product.vo.ComboSpuVO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

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

/**
 * @author xxw
 * @date 2022/8/19 11:51
 */
public class ComboDTO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    @Schema(description = "套餐id")
    private Long comboId;

    @Schema(description = "套餐名称")
    @NotBlank(message = "套餐名称不能为空")
    private String name;

    @Schema(description = "创建时间")
    private Date createTime;

    @Schema(description = "更新时间")
    private Date updateTime;

    @Schema(description = "活动开始时间")
    @NotNull(message = "活动开始时间不能为空")
    private Date startTime;

    @Schema(description = "活动结束时间")
    @NotNull(message = "活动结束时间不能为空")
    private Date endTime;

    @Schema(description = "状态， -1：已删除 0：已失效 1：开启")
    private Integer status;

    @Schema(description = "销量")
    private Integer soldNum;

    @Schema(description = "套餐价格")
    private Long price;

    @Schema(description = "店铺id")
    private Long shopId;

    @Schema(description = "主商品id")
    private Long mainSpuId;

    @Schema(description = "主商品")
    @Valid
    private ComboSpuVO mainSpu;

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

    @Schema(description = "商品数量")
    private Integer spuCount;

    @Schema(description = "套餐价")
    private Double matchingPrice;

    @Schema(description = "主商品名称")
    private String mainSpuName;

    @Schema(description = "搭配商品名称")
    private String matchSpuName;

    @Schema(description = "语言")
    private Integer lang;

    /**
     * 主商品id集合
     */
    private Set<Long> mainSpuIdList;

    /**
     * 搭配商品id集合
     */
    private Set<Long> matchSpuIdList;

    /**
     * 商品名称
     */
    private String spuName;

    public String getSpuName() {
        return spuName;
    }

    public void setSpuName(String spuName) {
        this.spuName = spuName;
    }

    public Set<Long> getMatchSpuIdList() {
        return matchSpuIdList;
    }

    public void setMatchSpuIdList(Set<Long> matchSpuIdList) {
        this.matchSpuIdList = matchSpuIdList;
    }

    public Set<Long> getMainSpuIdList() {
        return mainSpuIdList;
    }

    public void setMainSpuIdList(Set<Long> mainSpuIdList) {
        this.mainSpuIdList = mainSpuIdList;
    }

    public Long getComboId() {
        return comboId;
    }

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

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getSoldNum() {
        return soldNum;
    }

    public void setSoldNum(Integer soldNum) {
        this.soldNum = soldNum;
    }

    public Long getPrice() {
        return price;
    }

    public void setPrice(Long price) {
        this.price = price;
    }

    public Long getShopId() {
        return shopId;
    }

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

    public Long getMainSpuId() {
        return mainSpuId;
    }

    public void setMainSpuId(Long mainSpuId) {
        this.mainSpuId = mainSpuId;
    }

    public ComboSpuVO getMainSpu() {
        return mainSpu;
    }

    public void setMainSpu(ComboSpuVO mainSpu) {
        this.mainSpu = mainSpu;
    }

    public List<ComboSpuVO> getMatchingSpus() {
        return matchingSpus;
    }

    public void setMatchingSpus(List<ComboSpuVO> matchingSpus) {
        this.matchingSpus = matchingSpus;
    }

    public Integer getSpuCount() {
        return spuCount;
    }

    public void setSpuCount(Integer spuCount) {
        this.spuCount = spuCount;
    }

    public Double getMatchingPrice() {
        return matchingPrice;
    }

    public void setMatchingPrice(Double matchingPrice) {
        this.matchingPrice = matchingPrice;
    }

    public String getMainSpuName() {
        return mainSpuName;
    }

    public void setMainSpuName(String mainSpuName) {
        this.mainSpuName = mainSpuName;
    }

    public String getMatchSpuName() {
        return matchSpuName;
    }

    public void setMatchSpuName(String matchSpuName) {
        this.matchSpuName = matchSpuName;
    }

    public Integer getLang() {
        return lang;
    }

    public void setLang(Integer lang) {
        this.lang = lang;
    }

    @Override
    public String toString() {
        return "ComboDTO{" +
                "comboId=" + comboId +
                ", name='" + name + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", status=" + status +
                ", soldNum=" + soldNum +
                ", price=" + price +
                ", shopId=" + shopId +
                ", mainSpuId=" + mainSpuId +
                ", mainSpu=" + mainSpu +
                ", matchingSpus=" + matchingSpus +
                ", spuCount=" + spuCount +
                ", matchingPrice=" + matchingPrice +
                ", mainSpuName='" + mainSpuName + '\'' +
                ", matchSpuName='" + matchSpuName + '\'' +
                ", lang=" + lang +
                ", mainSpuIdList=" + mainSpuIdList +
                ", matchSpuIdList=" + matchSpuIdList +
                ", spuName='" + spuName + '\'' +
                '}';
    }
}
