package com.zhongshu.card.client.model.payment;

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

/**
 * @author TRX
 * @date 2025/1/16
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class OrderPayModel {

    @Schema(description = "是否可以支付")
    private Boolean isCanPay = Boolean.TRUE;

    @Schema(description = "支付提示")
    private String payMsg = "";

    public OrderPayModel setFiled(String msg) {
        this.isCanPay = Boolean.FALSE;
        this.payMsg = msg;
        return this;
    }

    public OrderPayModel setSuccess() {
        this.isCanPay = Boolean.TRUE;
        return this;
    }

    public OrderPayModel setSuccess(String msg) {
        this.isCanPay = Boolean.TRUE;
        this.payMsg = msg;
        return this;
    }

    public boolean isSuccess() {
        return this.isCanPay;
    }
}
