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

import com.github.microservice.types.payment.PaymentChannelType;
import com.github.microservice.types.payment.PaymentType;
import com.zhongshu.card.client.type.DataState;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 项目的 支付渠道配置模型
 *
 * @author TRX
 * @date 2024/9/27
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PayChannelSimpleModel {

    private String id;

    @Schema(description = "支付产品名称")
    private String name;

    @Schema(description = "logo")
    private String logo;

    @Schema(description = "支付类型")
    private PaymentType paymentType;

    private String paymentTypeStr;

    public String getPaymentTypeStr() {
        if (paymentType != null) {
            return paymentType.getRemark();
        }
        return "";
    }

    private String paymentChannelTypeName;

    public String getPaymentChannelTypeName() {
        if (paymentChannelType != null) {
            return paymentChannelType.name();
        }
        return "";
    }

    @Schema(description = "支付类型")
    private PaymentChannelType paymentChannelType;

    private String paymentChannelTypeStr;

    public String getPaymentChannelTypeStr() {
        if (paymentChannelType != null) {
            return paymentChannelType.getRemark();
        }
        return "";
    }

    @Schema(description = "汇率说明")
    private String rateMark;
}
