feat: modularize external providers

This commit is contained in:
2026-07-27 17:47:21 +08:00
parent db4c7b4496
commit 70b99e6063
47 changed files with 1219 additions and 667 deletions

View File

@@ -12,17 +12,21 @@ public sealed record TenantPointQuery(string? Status = null, int? Limit = null,
public sealed record UpsertPaymentAccountCommand(
string Provider,
TenantPaymentMode Mode,
string? Mode,
string? DisplayName,
TenantPaymentAccountStatus Status,
TenantExternalProviderStatus Status,
string? SecretRef,
int? Priority,
JsonElement ConfigPublic);
public sealed record TenantPaymentAccountItem(
public sealed record TenantPaymentProviderItem(
Guid Id,
string Provider,
string Mode,
string? DisplayName,
string Status,
TenantExternalProviderStatus Status,
string? SecretRef,
int Priority,
JsonElement ConfigPublic,
DateTimeOffset CreatedAt,
DateTimeOffset UpdatedAt);
@@ -150,12 +154,12 @@ public sealed record TenantCouponReport(int CouponCount, int ClaimedCount, int U
public interface ICommerceAdminService
{
Task<IReadOnlyCollection<TenantPaymentAccountItem>> GetPaymentAccountsAsync(
Task<IReadOnlyCollection<TenantPaymentProviderItem>> GetPaymentAccountsAsync(
CommerceAdminActor actor,
CommerceAdminQuery query,
CancellationToken cancellationToken = default);
Task<TenantPaymentAccountItem> UpsertPaymentAccountAsync(
Task<TenantPaymentProviderItem> UpsertPaymentAccountAsync(
CommerceAdminActor actor,
UpsertPaymentAccountCommand command,
CancellationToken cancellationToken = default);