
package com.tmerclub.cloud.coupon.dto;

import io.swagger.v3.oas.annotations.media.Schema;
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;

/**
 * 优惠券DTO
 *
 * @author YXF
 * @date 2020-12-08 17:22:56
 */
@Data
@ToString
public class CouponDTO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    @Schema(description = "优惠券ID")
    private Long couponId;

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

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

    @NotNull(message = "优惠券名称不能为空")
    @Schema(description = "优惠券名称")
    private String couponName;

    @Schema(description = "副标题")
    private String subTitle;

    @NotNull(message = "优惠类型不能为空")
    @Schema(description = "优惠类型 1:代金券 2:折扣券 3:兑换券")
    private Integer couponType;

    @NotNull(message = "适用商品类型不能为空")
    @Schema(description = "适用商品类型 0全部商品参与 1指定商品参与")
    private Integer suitableProdType;

    @NotNull(message = "获取方式不能为空")
    @Schema(description = "获取方式 0=用户领取 1=店铺发放")
    private Integer getWay;

    @NotNull(message = "生效类型不能为空")
    @Schema(description = "生效类型 1:固定时间 2:领取后生效")
    private Integer validTimeType;

    @Schema(description = "使用条件")
    private Long cashCondition;

    @Schema(description = "减免金额")
    private Long reduceAmount;

    @Schema(description = "折扣额度")
    private Double couponDiscount;

    @Schema(description = "投放时间")
    private Date launchTime;

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

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

    @Schema(description = "领券后X天起生效")
    private Integer afterReceiveDays;

    @Schema(description = "有效天数")
    private Integer validDays;

    @Schema(description = "总库存")
    private Integer totalStock;

    @Schema(description = "库存")
    private Integer stocks;

    @Schema(description = "每个用户领券上限，如不填则默认为1")
    private Integer limitNum;

    @Schema(description = "优惠券状态 0:过期 1:未过期")
    private Integer status;

    @NotNull(message = "优惠券投放状态不能为空")
    @Schema(description = "优惠券投放状态(-1:取消投放 0:自动投放 1:投放 2:违规下架 3:等待审核 4:暂不投放)")
    private Integer putonStatus;

    @Schema(description = "版本号")
    private Integer version;

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

    /**
     * 商店id列表
     */
    private List<Long> shopIds;

}
