package com.cf.imes.module.system.controller.admin.pay.vo;

import com.cf.imes.module.system.validation.pay.PayChannelCodeValid;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.Valid;
import jakarta.validation.constraints.DecimalMax;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.Digits;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;

/**
 * 充值支付vo
 *
 * @author Gqr
 * @since 2025/4/15 14:30
 */
@Data
@Valid
public class PayRechargeOrderReqVO {

    @Schema(description = "组织编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "组织编号不能为空")
    private Long organId;

    @Schema(description = "支付金额，单位：元", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
    @NotNull(message = "支付金额不能为空")
    @DecimalMin(value = "0.01", message = "支付金额必须大于零")
    @DecimalMax(value = "100000", message = "支付金额不能超过十万")
    @Digits(integer = 6, fraction = 2, message = "支付金额格式不正确")
    private BigDecimal price;

    @Schema(description = "支付渠道编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
    @PayChannelCodeValid
    @NotNull(message = "支付渠道编码不能为空")
    private Integer channelCode;

    @Schema(description = "充值活动规格编号", example = "0")
    private Long rechargeActivityId;
}
