sync public allowlist from private myoffice

This commit is contained in:
myoffice-sync
2026-08-05 10:36:17 +00:00
parent 6f7fd61ee9
commit 874796c860
720 changed files with 2841 additions and 69563 deletions
@@ -1,55 +0,0 @@
namespace MyOffice.Data.Repositories.Account;
using Microsoft.EntityFrameworkCore;
using Models.Accounts;
using MyOffice.DbContext;
public class AccountAccountCategoryRepository : AppRepository<AccountAccountCategory>, IAccountAccountCategoryRepository
{
public AccountAccountCategoryRepository(AppDbContext context) : base(context)
{
}
public List<AccountAccountCategory> Get(Guid userId, Guid accountId, Guid categoryId)
{
return _context.AccountAccountCategories
.Include(x => x.Account)
.Include(x => x.Category)
.Where(x => x.AccountId == accountId && x.CategoryId == categoryId && x.Category.UserId == userId)
.ToList();
}
public async Task<List<AccountAccountCategory>> GetAsync(
Guid userId,
Guid accountId,
Guid categoryId,
CancellationToken cancellationToken = default
)
{
return await _context.AccountAccountCategories
.Include(x => x.Account)
.Include(x => x.Category)
.Where(x => x.AccountId == accountId && x.CategoryId == categoryId && x.Category.UserId == userId)
.ToListAsync(cancellationToken);
}
public bool Remove(AccountAccountCategory accountAccountCategory)
{
return RemoveBase(accountAccountCategory) > 0;
}
public async Task<bool> RemoveAsync(AccountAccountCategory accountAccountCategory, CancellationToken cancellationToken = default)
{
return await RemoveBaseAsync(accountAccountCategory, cancellationToken) > 0;
}
public bool Add(AccountAccountCategory accountAccountCategory)
{
return AddBase(accountAccountCategory) > 0;
}
public async Task<bool> AddAsync(AccountAccountCategory accountAccountCategory, CancellationToken cancellationToken = default)
{
return await AddBaseAsync(accountAccountCategory, cancellationToken) > 0;
}
}