package com.xiaoniu.system.operation.coupon.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @Author haoxuyang
 * @Date 2024/10/17 14:49
 */
@Data
@Schema(description = "新增优惠券参数DTO")
public class AddCouponDTO {
    @Schema(description = "优惠券名称")
    @NotEmpty(message = "优惠券说明不能为空")
    private String couponName;

    @Schema(description = "优惠券图标")
    @NotEmpty(message = "优惠券图标不能为空")
    private String couponIcon;

    @Schema(description = "优惠券状态（1-上架 2-下架）")
    @NotNull(message = "优惠券状态不能为空")
    private Integer couponStatus;

    @Schema(description = "优惠券类型（1-平台通用 2-洗车 3-保养维修 4-车检验车 5-洗车券）")
    @NotNull(message = "优惠券类型不能为空")
    private Integer couponType;

    @Schema(description = "面向用户类型（全部用户 普通用户 新注册用户 会员用户 白银用户 黄金会员 高价值会员 重点保持用户 一般保持用户 重点发展用户 重点挽留用户 一般挽留用户 一般价值用户 一般发展用户）")
    @NotEmpty(message = "面向用户类型不能为空")
    private String userType;

    @Schema(description = "优惠方式（1-立减 2-满减 3-折扣）")
    @NotNull(message = "优惠方式不能为空")
    private Integer discountMethod;

    @Schema(description = "立减-优惠金额(时长)")
    private BigDecimal discountAmount;

    @Schema(description = "满减-满")
    private BigDecimal full;

    @Schema(description = "满减-减")
    private BigDecimal minus;

    @Schema(description = "折扣-打折")
    private Double discount;

    @Schema(description = "是否最大优惠限制(1-是 2-否)")
    private Integer discountStatus;

    @Schema(description = "折扣-最多可减")
    private BigDecimal maximumReduction;

    @Schema(description = "兑换方式（1-金额兑换 2-积分兑换 3-免费兑换）")
    @NotNull(message = "兑换方式不能为空")
    private Integer exchangeMethod;

    @Schema(description = "所需金额、积分")
    private String needed;

    @Schema(description = "发放时间")
    private String distributionTime;

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

    @Schema(description = "数量上限")
    private Integer maximumQuantity;

    @Schema(description = "有效期")
    private Integer periodValidity;

    @NotEmpty(message = "优惠券说明不能为空")
    @Schema(description = "优惠券说明")
    private String couponDescribe;
}
