44 lines
1.3 KiB
C#
44 lines
1.3 KiB
C#
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; }
|
||
}
|
||
}
|