package com.ruoyi.ss.payBill.domain.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author qzz
 * 2024/8/14
 */
@Data
public class PayResultVO {

    @ApiModelProperty("是否支付成功")
    private Boolean success;

    @ApiModelProperty("支付成功的时间")
    private LocalDateTime payTime;

    @ApiModelProperty("信息")
    private String msg;

    public static PayResultVO fail(String msg) {
        PayResultVO vo = new PayResultVO();
        vo.setMsg(msg);
        vo.setSuccess(false);
        return vo;
    }

    public static PayResultVO success(LocalDateTime payTime) {
        PayResultVO vo = new PayResultVO();
        vo.setPayTime(payTime);
        vo.setSuccess(true);
        return vo;
    }
}
