
package com.tmerclub.cloud.combo.vo;

import com.tmerclub.cloud.common.vo.BaseVO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.ToString;

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

/**
 * 套装VO
 *
 * @author tmerclub
 * @date 2022-08-16 09:18:06
 */
@Data
@ToString
public class ComboVO extends BaseVO 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;

}
