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

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

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

@Data
@Schema(description = "微信支付请求体", requiredProperties = {"orderId", "code"})
public class WechatPayRequest implements Serializable {

    /**
     * 订单id
     */
    @NotNull(message = "id不能为null")
    @Min(value = 1L, message = "id不能小于1")
    @Schema(description = "订单id", example = "1")
    private Long orderId;

    /**
     * 用户登录凭证
     */
    @NotBlank(message = "用户登录凭证不能为空")
    @Schema(description = "用户登录凭证", example = "23nm5jfds22a2324rr32rr")
    private String code;

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