26 lines
782 B
C#
26 lines
782 B
C#
namespace Fengling.RiskControl.Application.Services;
|
|
|
|
public interface IMemberIntegrationService
|
|
{
|
|
Task<int> GetMemberPointsBalanceAsync(long memberId);
|
|
Task<bool> DeductPointsAsync(long memberId, int points, string reason);
|
|
Task<bool> AddPointsAsync(long memberId, int points, string reason);
|
|
Task<MemberInfo?> GetMemberInfoAsync(long memberId);
|
|
}
|
|
|
|
public record MemberInfo
|
|
{
|
|
public long Id { get; init; }
|
|
public long TenantId { get; init; }
|
|
public string? PhoneNumber { get; init; }
|
|
public int PointsBalance { get; init; }
|
|
public DateTime RegisteredAt { get; init; }
|
|
}
|
|
|
|
public record PointsBalanceResponse
|
|
{
|
|
public int AvailableBalance { get; init; }
|
|
public int FrozenBalance { get; init; }
|
|
public int TotalBalance { get; init; }
|
|
}
|