refactor: move buildable .NET source into src/, update CI/doc paths
TaxBaik CI/CD / build-and-deploy (push) Successful in 2m7s
TaxBaik CI/CD / build-and-deploy (push) Successful in 2m7s
Groups the repo root into src (buildable source), docs (already existed), and everything else (db/, scripts/, tests/, deploy/ - deployment/ops/test assets that aren't compiled, already organized as their own folders). CI now only needs src/ to build: dotnet restore/build/test/publish all point at src/TaxBaik.sln, src/TaxBaik.Web/, src/TaxBaik.Proxy/. - git mv every project (Domain, Infrastructure, Application, Application.Tests, Web, Web.Client, Proxy) and TaxBaik.sln into src/ as a unit, so relative ProjectReference/.sln paths stay valid unchanged. - .gitea/workflows/deploy.yml: 6 dotnet restore/clean/build/test/publish invocations now point at src/. db/migrations and scripts/ stay at root (deploy_gb.sh and browser-e2e.yml only touch published output and the deployed URL, not source paths - verified, no changes needed there). - scripts/validate_admin_render.sh: admin render-mode file paths now src/TaxBaik.Web.Client/... - scripts/validate_kst_timestamps.sh: dropped deploy.sh from its target list - that script was removed in the prior cleanup commit (dead, no CI workflow referenced it) but this validator still expected it to exist. - CLAUDE.md, docs/ENGINEERING_HARNESS.md, docs/ADMIN_PATTERN_CRITIQUE_WBS.md: updated project-structure diagram, dotnet run/build commands, and grep targets to the new src/ paths (also fixed a pre-existing stale path in ADMIN_PATTERN_CRITIQUE_WBS.md that still said TaxBaik.Web/Components/Admin from before that ever moved to TaxBaik.Web.Client). - Added a Repo Root harness rule + Architecture Guardrail entries: new files belong under src/docs/tests/scripts/db/deploy, not loose at root; temp work stays outside the repo (or under a gitignored .scratch/) and is never committed. Verified locally: dotnet build/test src/TaxBaik.sln (26/26 tests), and all three scripts/validate_*.sh pass against the new layout. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1 @@
|
||||
namespace TaxBaik.Domain { }
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace TaxBaik.Domain.Entities;
|
||||
|
||||
public class AdminUser
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Username { get; set; } = null!;
|
||||
public string PasswordHash { get; set; } = null!;
|
||||
public DateTime? LastLoginAt { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace TaxBaik.Domain.Entities;
|
||||
|
||||
public class Announcement
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Title { get; set; } = null!;
|
||||
public string? Content { get; set; }
|
||||
public string DisplayType { get; set; } = "info";
|
||||
public bool IsActive { get; set; }
|
||||
public DateTime? StartsAt { get; set; }
|
||||
public DateTime? EndsAt { get; set; }
|
||||
public int SortOrder { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
namespace TaxBaik.Domain.Entities;
|
||||
|
||||
public class BlogPost
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Title { get; set; } = null!;
|
||||
public string Content { get; set; } = null!;
|
||||
public string Slug { get; set; } = null!;
|
||||
public int? CategoryId { get; set; }
|
||||
public string? Tags { get; set; }
|
||||
public int? AuthorId { get; set; }
|
||||
public DateTime? PublishedAt { get; set; }
|
||||
public int ViewCount { get; set; }
|
||||
public string? SeoTitle { get; set; }
|
||||
public string? SeoDescription { get; set; }
|
||||
public string? ThumbnailUrl { get; set; }
|
||||
public bool IsPublished { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
public DateTime? DeletedAt { get; set; }
|
||||
|
||||
// Navigation property (populated via LEFT JOIN, not stored in DB)
|
||||
public string? CategoryName { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace TaxBaik.Domain.Entities;
|
||||
|
||||
public class Category
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = null!;
|
||||
public string Slug { get; set; } = null!;
|
||||
public int SortOrder { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
namespace TaxBaik.Domain.Entities;
|
||||
|
||||
public class Client
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int? CompanyId { get; set; }
|
||||
public string Name { get; set; } = "";
|
||||
public string? CompanyName { get; set; }
|
||||
public string? Phone { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? ContactPerson { get; set; }
|
||||
public string? ServiceType { get; set; }
|
||||
public string? TaxType { get; set; }
|
||||
public string Status { get; set; } = "active";
|
||||
public string? Source { get; set; }
|
||||
public string? Memo { get; set; }
|
||||
|
||||
// Tax-specific fields
|
||||
public string? BusinessRegistrationNumber { get; set; }
|
||||
public string? BusinessType { get; set; }
|
||||
public DateTime? EstablishmentDate { get; set; }
|
||||
public string? AnnualRevenueRange { get; set; }
|
||||
public int? EmployeeCount { get; set; }
|
||||
public DateTime? LastTaxFilingDate { get; set; }
|
||||
public string TaxRiskLevel { get; set; } = "normal";
|
||||
public DateTime? NextFilingDueDate { get; set; }
|
||||
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace TaxBaik.Domain.Entities;
|
||||
|
||||
public class CommonCode
|
||||
{
|
||||
public string CodeGroup { get; set; } = string.Empty;
|
||||
public string CodeValue { get; set; } = string.Empty;
|
||||
public string CodeName { get; set; } = string.Empty;
|
||||
public int SortOrder { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace TaxBaik.Domain.Entities;
|
||||
|
||||
public class Company
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string CompanyCode { get; set; } = "";
|
||||
public string CompanyName { get; set; } = "";
|
||||
public string? ContactPerson { get; set; }
|
||||
public string? Phone { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? Memo { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace TaxBaik.Domain.Entities;
|
||||
|
||||
public class Consultation
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int ClientId { get; set; }
|
||||
public DateTime ConsultationDate { get; set; }
|
||||
public string? ServiceType { get; set; }
|
||||
public string Summary { get; set; } = null!;
|
||||
public string? Result { get; set; }
|
||||
public decimal? Fee { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
namespace TaxBaik.Domain.Entities;
|
||||
|
||||
public class ConsultingActivity
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int ClientId { get; set; }
|
||||
public string ActivityType { get; set; } = "";
|
||||
public DateTime ActivityDate { get; set; }
|
||||
public TimeOnly? ActivityTime { get; set; }
|
||||
public int? AssignedConsultantId { get; set; }
|
||||
public string Description { get; set; } = "";
|
||||
public string? Outcome { get; set; }
|
||||
public DateTime? NextFollowupDate { get; set; }
|
||||
public string? Notes { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
namespace TaxBaik.Domain.Entities;
|
||||
|
||||
public class Contract
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int ClientId { get; set; }
|
||||
public string ContractNumber { get; set; } = "";
|
||||
public string ServiceType { get; set; } = "";
|
||||
public DateTime ContractDate { get; set; }
|
||||
public DateTime StartDate { get; set; }
|
||||
public DateTime? EndDate { get; set; }
|
||||
public decimal? MonthlyFee { get; set; }
|
||||
public decimal? TotalAmount { get; set; }
|
||||
public string PaymentStatus { get; set; } = "pending";
|
||||
public string Status { get; set; } = "active";
|
||||
public string? Notes { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace TaxBaik.Domain.Entities;
|
||||
|
||||
public class Faq
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Question { get; set; } = null!;
|
||||
public string Answer { get; set; } = null!;
|
||||
public string? Category { get; set; }
|
||||
public int SortOrder { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
namespace TaxBaik.Domain.Entities;
|
||||
|
||||
public class Inquiry
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = null!;
|
||||
public string Phone { get; set; } = null!;
|
||||
public string? Email { get; set; }
|
||||
public string ServiceType { get; set; } = null!;
|
||||
public string Message { get; set; } = null!;
|
||||
public string Status { get; set; } = "new";
|
||||
public string? IpAddress { get; set; }
|
||||
public int? ClientId { get; set; }
|
||||
public string? AdminMemo { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime? UpdatedAt { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace TaxBaik.Domain.Entities;
|
||||
|
||||
public class PortalUser
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int? ClientId { get; set; }
|
||||
public string Email { get; set; } = "";
|
||||
public string Name { get; set; } = "";
|
||||
public string? Phone { get; set; }
|
||||
public string Provider { get; set; } = "local";
|
||||
public string? ProviderId { get; set; }
|
||||
public string? PasswordHash { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
namespace TaxBaik.Domain.Entities;
|
||||
|
||||
public class RevenueTracking
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int ClientId { get; set; }
|
||||
public string InvoiceNumber { get; set; } = "";
|
||||
public DateTime InvoiceDate { get; set; }
|
||||
public string? ServiceType { get; set; }
|
||||
public decimal Amount { get; set; }
|
||||
public string PaymentStatus { get; set; } = "pending";
|
||||
public DateTime? PaymentDate { get; set; }
|
||||
public DateTime? DueDate { get; set; }
|
||||
public string? Notes { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace TaxBaik.Domain.Entities;
|
||||
|
||||
public class SiteSetting
|
||||
{
|
||||
public string Key { get; set; } = null!;
|
||||
public string Value { get; set; } = null!;
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace TaxBaik.Domain.Entities;
|
||||
|
||||
public class TaxFiling
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int ClientId { get; set; }
|
||||
public string FilingType { get; set; } = null!;
|
||||
public DateTime DueDate { get; set; }
|
||||
public string Status { get; set; } = "pending";
|
||||
public string? Memo { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
// join
|
||||
public string? ClientName { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
namespace TaxBaik.Domain.Entities;
|
||||
|
||||
public class TaxFilingSchedule
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int ClientId { get; set; }
|
||||
public string FilingType { get; set; } = "";
|
||||
public DateTime DueDate { get; set; }
|
||||
public int FilingYear { get; set; }
|
||||
public string Status { get; set; } = "pending";
|
||||
public int? AssignedToId { get; set; }
|
||||
public DateTime? CompletedDate { get; set; }
|
||||
public string? Notes { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
namespace TaxBaik.Domain.Entities;
|
||||
|
||||
public class TaxProfile
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int ClientId { get; set; }
|
||||
public string? BusinessRegistration { get; set; }
|
||||
public string? BusinessType { get; set; }
|
||||
public DateTime? EstablishmentDate { get; set; }
|
||||
public string? AnnualRevenueRange { get; set; }
|
||||
public int? EmployeeCount { get; set; }
|
||||
public string? AccountingMethod { get; set; }
|
||||
public string? FiscalYearEnd { get; set; }
|
||||
public DateTime? LastFilingDate { get; set; }
|
||||
public DateTime? NextFilingDueDate { get; set; }
|
||||
public string TaxRiskLevel { get; set; } = "normal";
|
||||
public bool PreviousAuditHistory { get; set; }
|
||||
public string? SpecialNotes { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace TaxBaik.Domain.Enums;
|
||||
|
||||
public enum InquiryStatus
|
||||
{
|
||||
New = 0,
|
||||
Consulting = 1,
|
||||
Contracted = 2,
|
||||
Rejected = 3,
|
||||
Closed = 4
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace TaxBaik.Domain.Enums;
|
||||
|
||||
public enum ServiceType
|
||||
{
|
||||
Bookkeeping = 0, // 기장
|
||||
IncomeTax = 1, // 종소세
|
||||
VatTax = 2, // 부가세
|
||||
CapitalGainsTax = 3, // 양도세
|
||||
GiftInheritanceTax = 4,// 증여·상속
|
||||
Other = 5 // 기타
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace TaxBaik.Domain.Interfaces;
|
||||
|
||||
public interface IAdminUserRepository
|
||||
{
|
||||
Task<Entities.AdminUser?> GetByUsernameAsync(string username);
|
||||
Task<Entities.AdminUser?> GetByIdAsync(int id);
|
||||
Task CreateAsync(Entities.AdminUser user);
|
||||
Task UpdatePasswordHashAsync(int id, string passwordHash);
|
||||
Task UpdateLastLoginAtAsync(int id);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace TaxBaik.Domain.Interfaces;
|
||||
|
||||
using TaxBaik.Domain.Entities;
|
||||
|
||||
public interface IAnnouncementRepository
|
||||
{
|
||||
Task<IEnumerable<Announcement>> GetActiveAsync(CancellationToken cancellationToken = default);
|
||||
Task<IEnumerable<Announcement>> GetAllAsync(CancellationToken cancellationToken = default);
|
||||
Task<Announcement?> GetByIdAsync(int id, CancellationToken cancellationToken = default);
|
||||
Task<int> CreateAsync(Announcement announcement, CancellationToken cancellationToken = default);
|
||||
Task UpdateAsync(Announcement announcement, CancellationToken cancellationToken = default);
|
||||
Task DeleteAsync(int id, CancellationToken cancellationToken = default);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
namespace TaxBaik.Domain.Interfaces;
|
||||
|
||||
using TaxBaik.Domain.Entities;
|
||||
|
||||
public interface IBlogPostRepository
|
||||
{
|
||||
Task<BlogPost?> GetByIdAsync(int id, CancellationToken cancellationToken = default);
|
||||
Task<BlogPost?> GetBySlugAsync(string slug, CancellationToken cancellationToken = default);
|
||||
Task<(IEnumerable<BlogPost> Items, int Total)> GetPublishedPagedAsync(
|
||||
int page, int pageSize, int? categoryId = null, CancellationToken cancellationToken = default);
|
||||
Task<IEnumerable<BlogPost>> GetByCategorySlugAsync(string categorySlug, int limit, CancellationToken cancellationToken = default);
|
||||
Task<IEnumerable<BlogPost>> GetAllForAdminAsync(CancellationToken cancellationToken = default);
|
||||
Task<(IEnumerable<BlogPost> Items, int Total)> GetAdminPagedAsync(
|
||||
int page, int pageSize, CancellationToken cancellationToken = default);
|
||||
Task<(IEnumerable<BlogPost> Items, int Total)> GetArchivedPagedAsync(
|
||||
int page, int pageSize, CancellationToken cancellationToken = default);
|
||||
Task<int> CreateAsync(BlogPost post, CancellationToken cancellationToken = default);
|
||||
Task UpdateAsync(BlogPost post, CancellationToken cancellationToken = default);
|
||||
Task DeleteAsync(int id, CancellationToken cancellationToken = default);
|
||||
Task ArchiveAsync(int id, CancellationToken cancellationToken = default);
|
||||
Task RestoreAsync(int id, CancellationToken cancellationToken = default);
|
||||
Task IncrementViewCountAsync(int id, CancellationToken cancellationToken = default);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace TaxBaik.Domain.Interfaces;
|
||||
|
||||
using TaxBaik.Domain.Entities;
|
||||
|
||||
public interface ICategoryRepository
|
||||
{
|
||||
Task<IEnumerable<Category>> GetAllAsync(CancellationToken cancellationToken = default);
|
||||
Task<Category?> GetBySlugAsync(string slug, CancellationToken cancellationToken = default);
|
||||
Task<Category?> GetByIdAsync(int id, CancellationToken cancellationToken = default);
|
||||
Task<int> CreateAsync(Category category, CancellationToken cancellationToken = default);
|
||||
Task UpdateAsync(Category category, CancellationToken cancellationToken = default);
|
||||
Task DeleteAsync(int id, CancellationToken cancellationToken = default);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
namespace TaxBaik.Domain.Interfaces;
|
||||
|
||||
using TaxBaik.Domain.Entities;
|
||||
|
||||
public interface IClientRepository
|
||||
{
|
||||
Task<(IEnumerable<Client> Items, int Total)> GetPagedAsync(
|
||||
int page, int pageSize, string? status = null, string? search = null,
|
||||
CancellationToken ct = default);
|
||||
Task<Client?> GetByIdAsync(int id, CancellationToken ct = default);
|
||||
Task<Client?> GetByEmailAsync(string email, CancellationToken ct = default);
|
||||
Task<Client?> GetByPhoneAsync(string phone, CancellationToken ct = default);
|
||||
Task<int> CountByCreatedAtRangeAsync(DateTime startDateUtc, DateTime endDateUtc, CancellationToken ct = default);
|
||||
Task<int> CreateAsync(Client client, CancellationToken ct = default);
|
||||
Task UpdateAsync(Client client, CancellationToken ct = default);
|
||||
Task DeleteAsync(int id, CancellationToken ct = default);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using TaxBaik.Domain.Entities;
|
||||
|
||||
namespace TaxBaik.Domain.Interfaces;
|
||||
|
||||
public interface ICommonCodeRepository
|
||||
{
|
||||
Task<IEnumerable<string>> GetAllGroupsAsync(CancellationToken ct = default);
|
||||
Task<IEnumerable<CommonCode>> GetByGroupAsync(string codeGroup, CancellationToken ct = default);
|
||||
Task<IEnumerable<CommonCode>> GetAllActiveAsync(CancellationToken ct = default);
|
||||
Task<CommonCode?> GetAsync(string codeGroup, string codeValue, CancellationToken ct = default);
|
||||
Task UpsertAsync(CommonCode code, CancellationToken ct = default);
|
||||
Task DeleteAsync(string codeGroup, string codeValue, CancellationToken ct = default);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace TaxBaik.Domain.Interfaces;
|
||||
|
||||
using TaxBaik.Domain.Entities;
|
||||
|
||||
public interface ICompanyRepository
|
||||
{
|
||||
Task<int> CreateAsync(Company company, CancellationToken cancellationToken = default);
|
||||
Task<Company?> GetByIdAsync(int id, CancellationToken cancellationToken = default);
|
||||
Task<Company?> GetByCodeAsync(string code, CancellationToken cancellationToken = default);
|
||||
Task<IEnumerable<Company>> GetAllActiveAsync(CancellationToken cancellationToken = default);
|
||||
Task<(IEnumerable<Company> Items, int Total)> GetPagedAsync(int page, int pageSize, CancellationToken cancellationToken = default);
|
||||
Task UpdateAsync(Company company, CancellationToken cancellationToken = default);
|
||||
Task DeleteAsync(int id, CancellationToken cancellationToken = default);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace TaxBaik.Domain.Interfaces;
|
||||
|
||||
using TaxBaik.Domain.Entities;
|
||||
|
||||
public interface IConsultationRepository
|
||||
{
|
||||
Task<IEnumerable<Consultation>> GetByClientIdAsync(int clientId, CancellationToken ct = default);
|
||||
Task<int> CreateAsync(Consultation consultation, CancellationToken ct = default);
|
||||
Task DeleteAsync(int id, CancellationToken ct = default);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace TaxBaik.Domain.Interfaces;
|
||||
|
||||
using TaxBaik.Domain.Entities;
|
||||
|
||||
public interface IConsultingActivityRepository
|
||||
{
|
||||
Task<int> CreateAsync(ConsultingActivity activity, CancellationToken cancellationToken = default);
|
||||
Task<IEnumerable<ConsultingActivity>> GetAllAsync(CancellationToken cancellationToken = default);
|
||||
Task<IEnumerable<ConsultingActivity>> GetByClientIdAsync(int clientId, CancellationToken cancellationToken = default);
|
||||
Task<IEnumerable<ConsultingActivity>> GetPendingFollowupsAsync(CancellationToken cancellationToken = default);
|
||||
Task<IEnumerable<ConsultingActivity>> GetByConsultantAsync(int consultantId, DateTime fromDate, CancellationToken cancellationToken = default);
|
||||
Task UpdateAsync(ConsultingActivity activity, CancellationToken cancellationToken = default);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace TaxBaik.Domain.Interfaces;
|
||||
|
||||
using TaxBaik.Domain.Entities;
|
||||
|
||||
public interface IContractRepository
|
||||
{
|
||||
Task<int> CreateAsync(Contract contract, CancellationToken cancellationToken = default);
|
||||
Task<IEnumerable<Contract>> GetAllAsync(CancellationToken cancellationToken = default);
|
||||
Task<Contract?> GetByIdAsync(int id, CancellationToken cancellationToken = default);
|
||||
Task<IEnumerable<Contract>> GetByClientIdAsync(int clientId, CancellationToken cancellationToken = default);
|
||||
Task<IEnumerable<Contract>> GetActiveContractsAsync(CancellationToken cancellationToken = default);
|
||||
Task<IEnumerable<Contract>> GetExpiringContractsAsync(int daysAhead = 30, CancellationToken cancellationToken = default);
|
||||
Task UpdateAsync(Contract contract, CancellationToken cancellationToken = default);
|
||||
Task<decimal> GetMonthlyRecurringRevenueAsync(CancellationToken cancellationToken = default);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace TaxBaik.Domain.Interfaces;
|
||||
|
||||
using System.Data;
|
||||
|
||||
public interface IDbConnectionFactory
|
||||
{
|
||||
IDbConnection CreateConnection();
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace TaxBaik.Domain.Interfaces;
|
||||
|
||||
using TaxBaik.Domain.Entities;
|
||||
|
||||
public interface IFaqRepository
|
||||
{
|
||||
Task<IEnumerable<Faq>> GetActiveAsync(CancellationToken ct = default);
|
||||
Task<IEnumerable<Faq>> GetAllAsync(CancellationToken ct = default);
|
||||
Task<Faq?> GetByIdAsync(int id, CancellationToken ct = default);
|
||||
Task<int> CreateAsync(Faq faq, CancellationToken ct = default);
|
||||
Task UpdateAsync(Faq faq, CancellationToken ct = default);
|
||||
Task DeleteAsync(int id, CancellationToken ct = default);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
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 UpdateAsync(Inquiry inquiry, CancellationToken cancellationToken = default);
|
||||
Task LinkClientAsync(int inquiryId, int clientId, CancellationToken cancellationToken = default);
|
||||
Task DeleteAsync(int id, CancellationToken cancellationToken = default);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace TaxBaik.Domain.Interfaces;
|
||||
|
||||
using TaxBaik.Domain.Entities;
|
||||
|
||||
public interface IPortalUserRepository
|
||||
{
|
||||
Task<PortalUser?> GetByIdAsync(int id, CancellationToken ct = default);
|
||||
Task<PortalUser?> GetByEmailAsync(string email, CancellationToken ct = default);
|
||||
Task<PortalUser?> GetByProviderAsync(string provider, string providerId, CancellationToken ct = default);
|
||||
Task<int> CreateAsync(PortalUser user, CancellationToken ct = default);
|
||||
Task UpdateAsync(PortalUser user, CancellationToken ct = default);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace TaxBaik.Domain.Interfaces;
|
||||
|
||||
using TaxBaik.Domain.Entities;
|
||||
|
||||
public interface IRevenueTrackingRepository
|
||||
{
|
||||
Task<int> CreateAsync(RevenueTracking revenue, CancellationToken cancellationToken = default);
|
||||
Task<IEnumerable<RevenueTracking>> GetAllAsync(CancellationToken cancellationToken = default);
|
||||
Task<IEnumerable<RevenueTracking>> GetByClientIdAsync(int clientId, CancellationToken cancellationToken = default);
|
||||
Task<IEnumerable<RevenueTracking>> GetPendingPaymentsAsync(CancellationToken cancellationToken = default);
|
||||
Task<IEnumerable<RevenueTracking>> GetByDateRangeAsync(DateTime startDate, DateTime endDate, CancellationToken cancellationToken = default);
|
||||
Task UpdateAsync(RevenueTracking revenue, CancellationToken cancellationToken = default);
|
||||
Task MarkPaidAsync(int id, DateTime paymentDate, CancellationToken cancellationToken = default);
|
||||
Task<decimal> GetTotalRevenueAsync(DateTime startDate, DateTime endDate, CancellationToken cancellationToken = default);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using TaxBaik.Domain.Entities;
|
||||
|
||||
namespace TaxBaik.Domain.Interfaces;
|
||||
|
||||
public interface ISiteSettingRepository
|
||||
{
|
||||
Task<IReadOnlyDictionary<string, string>> GetAllAsync(CancellationToken cancellationToken = default);
|
||||
Task UpsertAsync(IEnumerable<SiteSetting> settings, CancellationToken cancellationToken = default);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace TaxBaik.Domain.Interfaces;
|
||||
|
||||
using TaxBaik.Domain.Entities;
|
||||
|
||||
public interface ITaxFilingRepository
|
||||
{
|
||||
Task<IEnumerable<TaxFiling>> GetByClientIdAsync(int clientId, CancellationToken ct = default);
|
||||
Task<IEnumerable<TaxFiling>> GetUpcomingAsync(int daysAhead, CancellationToken ct = default);
|
||||
Task<TaxFiling?> GetByIdAsync(int id, CancellationToken ct = default);
|
||||
Task<int> CreateAsync(TaxFiling filing, CancellationToken ct = default);
|
||||
Task UpdateAsync(TaxFiling filing, CancellationToken ct = default);
|
||||
Task DeleteAsync(int id, CancellationToken ct = default);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace TaxBaik.Domain.Interfaces;
|
||||
|
||||
using TaxBaik.Domain.Entities;
|
||||
|
||||
public interface ITaxFilingScheduleRepository
|
||||
{
|
||||
Task<int> CreateAsync(TaxFilingSchedule schedule, CancellationToken cancellationToken = default);
|
||||
Task<IEnumerable<TaxFilingSchedule>> GetAllAsync(CancellationToken cancellationToken = default);
|
||||
Task<TaxFilingSchedule?> GetByIdAsync(int id, CancellationToken cancellationToken = default);
|
||||
Task<IEnumerable<TaxFilingSchedule>> GetByClientIdAsync(int clientId, CancellationToken cancellationToken = default);
|
||||
Task<IEnumerable<TaxFilingSchedule>> GetUpcomingDuesAsync(int daysAhead = 30, CancellationToken cancellationToken = default);
|
||||
Task<IEnumerable<TaxFilingSchedule>> GetByStatusAsync(string status, CancellationToken cancellationToken = default);
|
||||
Task UpdateAsync(TaxFilingSchedule schedule, CancellationToken cancellationToken = default);
|
||||
Task MarkCompletedAsync(int id, CancellationToken cancellationToken = default);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace TaxBaik.Domain.Interfaces;
|
||||
|
||||
using TaxBaik.Domain.Entities;
|
||||
|
||||
public interface ITaxProfileRepository
|
||||
{
|
||||
Task<int> CreateAsync(TaxProfile profile, CancellationToken cancellationToken = default);
|
||||
Task<TaxProfile?> GetByIdAsync(int id, CancellationToken cancellationToken = default);
|
||||
Task<IEnumerable<TaxProfile>> GetAllAsync(CancellationToken cancellationToken = default);
|
||||
Task<TaxProfile?> GetByClientIdAsync(int clientId, CancellationToken cancellationToken = default);
|
||||
Task UpdateAsync(TaxProfile profile, CancellationToken cancellationToken = default);
|
||||
Task<IEnumerable<TaxProfile>> GetByRiskLevelAsync(string riskLevel, CancellationToken cancellationToken = default);
|
||||
Task<IEnumerable<TaxProfile>> GetUpcomingFilingDuesAsync(DateTime startDate, DateTime endDate, CancellationToken cancellationToken = default);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user