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