5053245575
**Architecture Refactor (SOLID Principles):** - Implement AdminDashboardController (REST API) - Add dashboard summary endpoint - Add upcoming filings endpoint - Add recent inquiries endpoint - Add monthly statistics endpoint **Database Layer (Repository Pattern):** - Extend IInquiryRepository with date range queries - Implement CountByDateRangeAsync - Implement CountByStatusAndDateAsync - Extend InquiryRepository with new methods **Service Layer (Single Responsibility):** - Extend AdminDashboardService with API methods - Add GetRecentInquiriesAsync - Add GetMonthlyStatsAsync with caching **Test Coverage:** - Update FakeInquiryRepository mock with new methods **SOLID Application:** ✓ Single Responsibility: Each class has one reason to change ✓ Open/Closed: Dashboard API can be extended without modifying existing code ✓ Dependency Inversion: Service depends on Repository abstraction ✓ Interface Segregation: API endpoints are focused and specific Status: ✓ Compiles successfully (0 errors, 0 warnings) Next phases: - Add remaining API controllers (Announcement, Client, FAQ, TaxFiling) - Refactor Blazor components to use API instead of services - Implement JWT token refresh mechanism - Add SignalR for change notifications Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
20 lines
1.2 KiB
C#
20 lines
1.2 KiB
C#
namespace TaxBaik.Domain.Interfaces;
|
|
|
|
using TaxBaik.Domain.Entities;
|
|
|
|
public interface IInquiryRepository
|
|
{
|
|
Task<int> CreateAsync(Inquiry inquiry, CancellationToken cancellationToken = default);
|
|
Task<Inquiry?> GetByIdAsync(int id, CancellationToken cancellationToken = default);
|
|
Task<(IEnumerable<Inquiry> Items, int Total)> GetPagedAsync(
|
|
int page, int pageSize, string? status = null, CancellationToken cancellationToken = default);
|
|
Task<int> CountAsync(CancellationToken cancellationToken = default);
|
|
Task<int> CountThisMonthAsync(CancellationToken cancellationToken = default);
|
|
Task<int> CountByStatusAsync(string status, CancellationToken cancellationToken = default);
|
|
Task<int> CountByDateRangeAsync(DateTime startDate, DateTime endDate, CancellationToken cancellationToken = default);
|
|
Task<int> CountByStatusAndDateAsync(string status, DateTime startDate, DateTime endDate, CancellationToken cancellationToken = default);
|
|
Task UpdateStatusAsync(int id, string status, CancellationToken cancellationToken = default);
|
|
Task UpdateAdminMemoAsync(int id, string? adminMemo, CancellationToken cancellationToken = default);
|
|
Task LinkClientAsync(int inquiryId, int clientId, CancellationToken cancellationToken = default);
|
|
}
|