fengling-console/Repositories/ITenantRepository.cs
movingsam 74122b2c8c feat(auth): extract Tenant to Platform domain
- Add Fengling.Platform domain and infrastructure projects
- Move Tenant aggregate from AuthService/Console to Platform.Domain
- Add TenantRepository and SeedData to Platform
- Remove duplicate Tenant/TenantInfo models from AuthService and Console
- Update controllers and services to use Platform.Domain.Tenant
- Add new migrations for PlatformDbContext

BREAKING CHANGE: Tenant entity now uses strongly-typed ID (TenantId)
2026-02-18 23:02:03 +08:00

18 lines
740 B
C#

using Fengling.Console.Models.Entities;
using Fengling.Platform.Domain.AggregatesModel.TenantAggregate;
namespace Fengling.Console.Repositories;
public interface ITenantRepository
{
Task<Tenant?> GetByIdAsync(long id);
Task<Tenant?> GetByTenantCodeAsync(string tenantCode);
Task<IEnumerable<Tenant>> GetAllAsync();
Task<IEnumerable<Tenant>> GetPagedAsync(int page, int pageSize, string? name = null, string? tenantCode = null, TenantStatus? status = null);
Task<int> CountAsync(string? name = null, string? tenantCode = null, TenantStatus? status = null);
Task AddAsync(Tenant tenant);
Task UpdateAsync(Tenant tenant);
Task DeleteAsync(Tenant tenant);
Task<int> GetUserCountAsync(TenantId tenantId);
}