- Tag DTO 6종 생성 (List/Create/Update/Delete Request/Response) - ITagRepository 확장 (GetTagListAsync, CountByServiceAsync) - IDeviceRepository 확장 (GetDeviceCountsByTagIdsAsync) - ITagService/TagService 구현 (CRUD 비즈니스 로직) - TagController 신규 생성 (v1/in/tag/list, create, update, delete) - DI 등록 Closes #186
24 lines
1.1 KiB
C#
24 lines
1.1 KiB
C#
using SPMS.Domain.Entities;
|
|
using SPMS.Domain.Enums;
|
|
|
|
namespace SPMS.Domain.Interfaces;
|
|
|
|
public interface IDeviceRepository : IRepository<Device>
|
|
{
|
|
Task<Device?> GetByServiceAndTokenAsync(long serviceId, string deviceToken);
|
|
Task<Device?> GetByIdAndServiceAsync(long id, long serviceId);
|
|
Task<int> GetActiveCountByServiceAsync(long serviceId);
|
|
Task<IReadOnlyList<Device>> GetByPlatformAsync(long serviceId, Platform platform);
|
|
Task<(IReadOnlyList<Device> Items, int TotalCount)> GetPagedAsync(
|
|
long? serviceId, int page, int size,
|
|
Platform? platform = null, bool? pushAgreed = null,
|
|
bool? isActive = null, List<int>? tags = null,
|
|
string? keyword = null, bool? marketingAgreed = null);
|
|
Task<IReadOnlyList<Device>> GetAllFilteredAsync(
|
|
long? serviceId,
|
|
Platform? platform = null, bool? pushAgreed = null,
|
|
bool? isActive = null, List<int>? tags = null,
|
|
string? keyword = null, bool? marketingAgreed = null);
|
|
Task<Dictionary<long, int>> GetDeviceCountsByTagIdsAsync(IEnumerable<long> tagIds);
|
|
}
|