
package com.tmerclub.cloud.discount.dto;

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

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

/**
 * 满减满折优惠DTO
 *
 * @author lhd
 * @date 2020-12-10 13:43:38
 */
public class DiscountDTO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    @Schema(description = "满减满折优惠id")
    private Long discountId;

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

    @Schema(description = "店铺名称")
    private String shopName;

    @Schema(description = "活动名称")
    @NotNull(message = "活动名称不能为空")
    private String discountName;

    @Schema(description = "枚举DiscountRule(0 满钱减钱 3满件打折)")
    private Integer discountRule;

    @Schema(description = "减免类型 0按满足最高层级减一次 1每满一次减一次")
    private Integer discountType;

    @Schema(description = "适用商品类型 0全部商品参与 1指定商品参与")
    @Max(value = 1, message = "适用商品类型错误")
    @Min(value = 0, message = "适用商品类型错误")
    private Integer suitableSpuType;

    @Max(999999999)
    @Schema(description = "最多减多少")
    private Long maxReduceAmount;

    @Schema(description = "开始时间")
    private Date startTime;

    @Schema(description = "结束时间")
    private Date endTime;

    @Schema(description = "活动状态:(0:关闭、1:开启、2:违规下线、3:平台审核)")
    @Min(value = 0, message = "活动添加或改变后的状态异常")
    @Max(value = 3, message = "活动添加或改变后的状态异常")
    private Integer status;

    @Schema(description = "手机端活动图片")
    private String mobilePic;

    @Schema(description = "pc端活动列表图片")
    private String pcPic;

    @Schema(description = "pc端活动背景图片")
    private String pcBackgroundPic;

    @Schema(description = "商品Id列表")
    private List<Long> spuIds;

    @Schema(description = "活动项")
    private List<DiscountItemDTO> discountItemList;

    private List<Long> shopIds;

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public List<Long> getShopIds() {
        return shopIds;
    }

    public void setShopIds(List<Long> shopIds) {
        this.shopIds = shopIds;
    }

    public List<DiscountItemDTO> getDiscountItemList() {
        return discountItemList;
    }

    public void setDiscountItemList(List<DiscountItemDTO> discountItemList) {
        this.discountItemList = discountItemList;
    }

    public List<Long> getSpuIds() {
        return spuIds;
    }

    public void setSpuIds(List<Long> spuIds) {
        this.spuIds = spuIds;
    }

    public Long getDiscountId() {
        return discountId;
    }

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

    public Long getShopId() {
        return shopId;
    }

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

    public String getDiscountName() {
        return discountName;
    }

    public void setDiscountName(String discountName) {
        this.discountName = discountName;
    }

    public Integer getDiscountRule() {
        return discountRule;
    }

    public void setDiscountRule(Integer discountRule) {
        this.discountRule = discountRule;
    }

    public Integer getDiscountType() {
        return discountType;
    }

    public void setDiscountType(Integer discountType) {
        this.discountType = discountType;
    }

    public Integer getSuitableSpuType() {
        return suitableSpuType;
    }

    public void setSuitableSpuType(Integer suitableSpuType) {
        this.suitableSpuType = suitableSpuType;
    }

    public Long getMaxReduceAmount() {
        return maxReduceAmount;
    }

    public void setMaxReduceAmount(Long maxReduceAmount) {
        this.maxReduceAmount = maxReduceAmount;
    }

    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 String getMobilePic() {
        return mobilePic;
    }

    public void setMobilePic(String mobilePic) {
        this.mobilePic = mobilePic;
    }

    public String getPcPic() {
        return pcPic;
    }

    public void setPcPic(String pcPic) {
        this.pcPic = pcPic;
    }

    public String getPcBackgroundPic() {
        return pcBackgroundPic;
    }

    public void setPcBackgroundPic(String pcBackgroundPic) {
        this.pcBackgroundPic = pcBackgroundPic;
    }

    @Override
    public String toString() {
        return "DiscountDTO{" +
                "discountId=" + discountId +
                ", shopId=" + shopId +
                ", shopName='" + shopName + '\'' +
                ", discountName='" + discountName + '\'' +
                ", discountRule=" + discountRule +
                ", discountType=" + discountType +
                ", suitableSpuType=" + suitableSpuType +
                ", maxReduceAmount=" + maxReduceAmount +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", status=" + status +
                ", mobilePic='" + mobilePic + '\'' +
                ", pcPic='" + pcPic + '\'' +
                ", pcBackgroundPic='" + pcBackgroundPic + '\'' +
                ", spuIds=" + spuIds +
                ", discountItemList=" + discountItemList +
                ", shopIds=" + shopIds +
                '}';
    }
}
