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

import com.github.microservice.types.OrderState;
import com.zhongshu.card.client.model.devices.DeviceInfoModel;
import com.zhongshu.card.client.model.org.OrganizationPayInfoModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 * @author TRX
 * @date 2024/6/17
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ExpenseFlowPayShowModel {

    @Schema(description = "数据id")
    private String id;

    @Schema(description = "创建时间")
    private Long createTime;

    private OrderState orderState;

    private String orderStateStr;

    public String getOrderStateStr() {
        if (orderState != null) {
            return orderState.getRemark();
        }
        return "";
    }

    @Schema(description = "消费订单号")
    private String orderNo;

    @Schema(description = "支付订单号")
    private String paymentNo;

    @Schema(description = "订单生效时间")
    private Long startTime;

    @Schema(description = "订单失效时间")
    private Long expirationTime;

    @Schema(description = "消费金额（单位：分）")
    private BigDecimal payAmount;

    @Schema(description = "支付金额（元）")
    private String payAmountStr;

    @Schema(description = "设备信息")
    private DeviceInfoModel deviceInfo;

    @Schema(description = "收款机构信息")
    private OrganizationPayInfoModel shopInfo;

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

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