package com.gxwebsoft.payment.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;

/**
 * 支付状态更新请求DTO
 * 用于手动更新支付状态的请求参数
 *
 * @author 科技小王子
 * @since 2025-01-26
 */
@Data
@Schema(name = "支付状态更新请求", description = "用于手动更新支付状态")
public class PaymentStatusUpdateRequest {

    @Schema(description = "订单号", required = true, example = "ORDER_1756544921075")
    @NotBlank(message = "订单号不能为空")
    private String orderNo;

    @Schema(description = "租户ID", required = true, example = "10398")
    @NotNull(message = "租户ID不能为空")
    @Positive(message = "租户ID必须为正数")
    private Integer tenantId;

    @Schema(description = "第三方交易号", example = "4200001234567890123")
    private String transactionId;

    @Schema(description = "支付时间", example = "2025-01-26T10:30:00")
    private String payTime;

    @Override
    public String toString() {
        return String.format("PaymentStatusUpdateRequest{orderNo='%s', tenantId=%d, transactionId='%s', payTime='%s'}", 
            orderNo, tenantId, transactionId, payTime);
    }
}
