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

import com.github.microservice.types.payment.PaymentType;
import com.zhongshu.card.client.model.projectAbout.PayChannelConfigModel;
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/7/26
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ProjectPaySettingModel {

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

    @Schema(description = "项目id")
    private String projectOid;

    @Schema(description = "项目的支付渠道设置")
    private PaymentType channelType;

    private String channelTypeStr;

    public String getChannelTypeStr() {
        if (channelType != null) {
            return channelType.getRemark();
        }
        return "";
    }

    @Schema(description = "关联的支付产品信息")
    private PayChannelConfigModel payChannelConfigModel;

    @Schema(description = "是否配置了数据")
    private Boolean isConfig = Boolean.FALSE;

    @Schema(description = "是否可用")
    private DataState state;
}
