Add transfer tracking and secure admin access
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
namespace MiaoJiZhang.Api.Contracts;
|
||||
|
||||
public record AdminLoginRequest(string Username, string Password);
|
||||
public record AdminChangePasswordRequest(string CurrentPassword, string NewPassword);
|
||||
public record CreateAdminUserRequest(string Username, string Password, string Role);
|
||||
public record UpdateAdminUserRequest(string Role, bool IsActive, bool MustChangePassword);
|
||||
public record ResetAdminPasswordRequest(string Password);
|
||||
@@ -21,7 +21,14 @@ public record CreateTransactionRequest(
|
||||
DateTime? OccurredAt, // null = 现在
|
||||
string? Source, // manual | voice | ocr
|
||||
string? SourceText,
|
||||
string? ClientRequestId = null);
|
||||
string? ClientRequestId = null,
|
||||
string? TransferDirection = null,
|
||||
string? Counterparty = null,
|
||||
string? Provider = null,
|
||||
string? ProviderTransactionId = null,
|
||||
string? RecognitionOccurrenceId = null,
|
||||
string? EvidenceFingerprint = null,
|
||||
string? RecognitionConfidence = null);
|
||||
|
||||
public record UpdateTransactionRequest(
|
||||
long LedgerId,
|
||||
@@ -31,14 +38,23 @@ public record UpdateTransactionRequest(
|
||||
string? Note,
|
||||
string? PaymentMethod,
|
||||
DateTime OccurredAt,
|
||||
DateTime? BaseUpdatedAt = null);
|
||||
DateTime? BaseUpdatedAt = null,
|
||||
string? TransferDirection = null,
|
||||
string? Counterparty = null);
|
||||
|
||||
public record TransactionDto(
|
||||
long Id, long LedgerId, long CategoryId, string CategoryName, string CategoryIcon,
|
||||
string Type, decimal Amount, string? Note, string? PaymentMethod,
|
||||
DateTime OccurredAt, string Source, string? SourceText,
|
||||
bool IsDeleted = false, string CategoryColor = "mint",
|
||||
DateTime? UpdatedAt = null);
|
||||
DateTime? UpdatedAt = null,
|
||||
string? TransferDirection = null,
|
||||
string? Counterparty = null,
|
||||
string? Provider = null,
|
||||
string? ProviderTransactionId = null,
|
||||
string? RecognitionOccurrenceId = null,
|
||||
string? EvidenceFingerprint = null,
|
||||
string? RecognitionConfidence = null);
|
||||
|
||||
public record DailyGroupDto(DateOnly Date, decimal Expense, decimal Income, List<TransactionDto> Items);
|
||||
|
||||
@@ -128,15 +144,18 @@ public record PeriodReportDto(
|
||||
public record OcrParseRequest(string Text, string? Source = null);
|
||||
public record OcrParseResponse(
|
||||
bool Matched, long CategoryId, string CategoryName, string CategoryIcon,
|
||||
decimal Amount, string? PaymentMethod, string Note, string Type);
|
||||
decimal Amount, string? PaymentMethod, string Note, string Type,
|
||||
string? TransferDirection = null, string? Counterparty = null);
|
||||
public record ImageParseItemResponse(
|
||||
bool Matched, long CategoryId, string CategoryName, string CategoryIcon,
|
||||
string Type, decimal Amount, string? PaymentMethod, string Note,
|
||||
DateTime? OccurredAt);
|
||||
DateTime? OccurredAt,
|
||||
string? TransferDirection = null, string? Counterparty = null);
|
||||
public record ImageParseResponse(
|
||||
bool Matched, long CategoryId, string CategoryName, string CategoryIcon,
|
||||
decimal Amount, string? PaymentMethod, string Note, string Type,
|
||||
List<ImageParseItemResponse> Items, DateTime? OccurredAt);
|
||||
List<ImageParseItemResponse> Items, DateTime? OccurredAt,
|
||||
string? TransferDirection = null, string? Counterparty = null);
|
||||
|
||||
public record RecognitionBatchCandidateRequest(
|
||||
string CandidateId,
|
||||
@@ -152,7 +171,13 @@ public record RecognitionBatchCandidateRequest(
|
||||
string? CategoryHint,
|
||||
string Confidence,
|
||||
string? SourceText,
|
||||
List<string>? EvidenceIds = null);
|
||||
List<string>? EvidenceIds = null,
|
||||
string? TransferDirection = null,
|
||||
string? Counterparty = null,
|
||||
string? Provider = null,
|
||||
string? ProviderTransactionId = null,
|
||||
string? RecognitionOccurrenceId = null,
|
||||
string? IdentityConfidence = null);
|
||||
|
||||
public record RecognitionBatchEvidenceRequest(
|
||||
string EvidenceId,
|
||||
@@ -180,7 +205,9 @@ public record RecognitionBatchActionResponse(
|
||||
string? Note,
|
||||
DateTime? OccurredAt,
|
||||
double Confidence,
|
||||
string Reason);
|
||||
string Reason,
|
||||
string? TransferDirection = null,
|
||||
string? Counterparty = null);
|
||||
|
||||
public record RecognitionBatchResponse(
|
||||
string BatchId,
|
||||
@@ -196,7 +223,14 @@ public record RecognitionBatchTransactionItemRequest(
|
||||
string? PaymentMethod,
|
||||
DateTime OccurredAt,
|
||||
string? Source,
|
||||
string? SourceText);
|
||||
string? SourceText,
|
||||
string? TransferDirection = null,
|
||||
string? Counterparty = null,
|
||||
string? Provider = null,
|
||||
string? ProviderTransactionId = null,
|
||||
string? RecognitionOccurrenceId = null,
|
||||
string? EvidenceFingerprint = null,
|
||||
string? RecognitionConfidence = null);
|
||||
|
||||
public record CreateRecognitionBatchRequest(
|
||||
string BatchId,
|
||||
|
||||
Reference in New Issue
Block a user