- 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)
18 lines
740 B
C#
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);
|
|
}
|