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

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/11/12
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PayOrderSettingModel {

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

    @Schema(description = "支付渠道")
    private PaymentType paymentType;

    @Schema(description = "名称")
    private String name;

    @Schema(description = "支付产品的图标")
    private String logo;

    private String paymentTypeStr;

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

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

    private String paymentChannelTypeStr;

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

    @Schema(description = "排序")
    private Long sort = 1l;

    @Schema(description = "是否启用")
    private DataState state = DataState.Enable;

}
