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

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

import java.io.Serial;
import java.io.Serializable;
import com.greenorange.promotion.common.PageRequest;

/**
 * 推广码查询请求体，继承自分页请求 PageRequest
 */
@Data
@Schema(description = "推广码查询请求体", requiredProperties = {"current", "pageSize"})
public class PromoCodeQueryRequest extends PageRequest implements Serializable {

    /**
     * 推广码ID
     */
    @Min(value = 1L, message = "推广码ID ID不能小于1")
    @Schema(description = "推广码ID", example = "1")
    private Long id;

    /**
     * 推广码信息key
     */
    @Schema(description = "推广码信息key", example = "ykxy227")
    private String promoCodeInfoKey;

    /**
     * 推广码链接
     */
    @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;

    /**
     * 推广码状态(true:占用，false:空闲)
     */
    @Schema(description = "推广码状态(true:占用，false:空闲)", example = "false")
    private Boolean promoCodeStatus;


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

