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);
}
