22 lines
823 B
C#
22 lines
823 B
C#
using SPMS.Domain.Entities;
|
|
using SPMS.Domain.Enums;
|
|
|
|
namespace SPMS.Domain.Interfaces;
|
|
|
|
public interface IServiceRepository : IRepository<Service>
|
|
{
|
|
Task<Service?> GetByServiceCodeAsync(string serviceCode);
|
|
Task<Service?> GetByApiKeyAsync(string apiKey);
|
|
Task<Service?> GetByIdWithIpsAsync(long id);
|
|
Task<Service?> GetByServiceCodeWithIpsAsync(string serviceCode);
|
|
Task<IReadOnlyList<Service>> GetByStatusAsync(ServiceStatus status);
|
|
Task<bool> ServiceNameExistsAsync(string serviceName);
|
|
Task<bool> ServiceCodeExistsAsync(string serviceCode);
|
|
|
|
// ServiceIp methods
|
|
Task<ServiceIp?> GetServiceIpByIdAsync(long ipId);
|
|
Task<bool> ServiceIpExistsAsync(long serviceId, string ipAddress);
|
|
Task AddServiceIpAsync(ServiceIp serviceIp);
|
|
void DeleteServiceIp(ServiceIp serviceIp);
|
|
}
|