package com.greenorange.promotion.model.dto.promoCode;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.AssertFalse;
import jakarta.validation.constraints.AssertTrue;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Min;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * 推广码添加请求体
 */
@Data
@Schema(description = "推广码添加请求体", requiredProperties = {
                "promoCodeInfoKey",
                "promoCodeLink",
                "projectId",
                "promoCodeStatus",
                "promoCodeImage"
})
public class PromoCodeAddRequest implements Serializable {

    /**
     * 推广码信息key
     */
    @NotBlank(message = "推广码信息key不能为空")
    @Schema(description = "推广码信息key", example = "ykxy227")
    private String promoCodeInfoKey;

    /**
     * 推广码链接
     */
    @NotBlank(message = "推广码链接不能为空")
    @Schema(description = "推广码链接", example = "mp://y04CZgGkCBmIaZd")
    private String promoCodeLink;

    /**
     * 推广码图片
     */
    @NotBlank(message = "推广码图片不能为空")
    @Schema(description = "推广码图片", example = "http://xxx.png")
    private String promoCodeImage;

    /**
     * 项目ID
     */
    @Min(value = 1L, message = "项目ID ID不能小于1")
    @Schema(description = "项目ID", example = "1")
    private Long projectId;


    @Serial
    private static final long serialVersionUID = 1L;
}

