ql_apimanager_backend/Apimanager_backend/Models/PaymentConfig.cs

44 lines
1.3 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.ComponentModel.DataAnnotations;
namespace Apimanager_backend.Models
{
public class PaymentConfig
{
public int Id { get; set; }
/// <summary>支付方式(如 Alipay、WeChat、Stripe...</summary>
[Required]
public PaymentType Method { get; set; } // varchar(50)
//接口类型:官方/易支付等
public string? Url { get; set; }
[Required]
public PayType PayType { get; set; }
/// <summary>商户号或 AppId</summary>
public string? AppId { get; set; }
/// <summary>商户密钥 / 私钥</summary>
public string? SecretKey { get; set; }
/// <summary>公钥(如支付宝公钥)</summary>
public string? PublicKey { get; set; }
/// <summary>回调地址notify_url</summary>
public string? NotifyUrl { get; set; }
/// <summary>支付网关地址gateway URL</summary>
public string? GatewayUrl { get; set; }
/// <summary>是否启用此配置</summary>
public bool IsEnabled { get; set; } = true;
/// <summary>额外配置项JSON 格式可扩展</summary>
public string? ExtraSettingsJson { get; set; } // 可包含 cert 路径、支付版本等
/// <summary>备注</summary>
public string? Description { get; set; }
}
}