Epub Annotation System (#4008)

Co-authored-by: Fesaa <77553571+Fesaa@users.noreply.github.com>
Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
This commit is contained in:
Joe Milazzo
2025-08-30 14:01:00 -05:00
committed by GitHub
parent 3b883b178f
commit b141613d60
170 changed files with 15837 additions and 3158 deletions
@@ -16,6 +16,7 @@ public interface IUserTableOfContentRepository
void Remove(AppUserTableOfContent toc);
Task<bool> IsUnique(int userId, int chapterId, int page, string title);
IEnumerable<PersonalToCDto> GetPersonalToC(int userId, int chapterId);
Task<List<PersonalToCDto>> GetPersonalToCForPage(int userId, int chapterId, int page);
Task<AppUserTableOfContent?> Get(int userId, int chapterId, int pageNum, string title);
}
@@ -55,6 +56,15 @@ public class UserTableOfContentRepository : IUserTableOfContentRepository
.AsEnumerable();
}
public async Task<List<PersonalToCDto>> GetPersonalToCForPage(int userId, int chapterId, int page)
{
return await _context.AppUserTableOfContent
.Where(t => t.AppUserId == userId && t.ChapterId == chapterId && t.PageNumber == page)
.ProjectTo<PersonalToCDto>(_mapper.ConfigurationProvider)
.OrderBy(t => t.PageNumber)
.ToListAsync();
}
public async Task<AppUserTableOfContent?> Get(int userId,int chapterId, int pageNum, string title)
{
return await _context.AppUserTableOfContent