Repositories + some models
This commit is contained in:
20
src/Printbase.Domain/Repositories/IProductRepository.cs
Normal file
20
src/Printbase.Domain/Repositories/IProductRepository.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Printbase.Domain.Common;
|
||||
using Printbase.Domain.Common.Models;
|
||||
using Printbase.Domain.Entities.Product;
|
||||
|
||||
namespace Printbase.Domain.Repositories;
|
||||
|
||||
public interface IProductRepository
|
||||
{
|
||||
Task<Product?> GetByIdAsync(Guid id, CancellationToken cancellationToken = default);
|
||||
Task<Product?> GetByIdWithVariantsAsync(Guid id, CancellationToken cancellationToken = default);
|
||||
Task<Product?> GetByIdWithCategoryAsync(Guid id, CancellationToken cancellationToken = default);
|
||||
Task<Product?> GetByIdFullAsync(Guid id, CancellationToken cancellationToken = default);
|
||||
Task<PagedResult<Product>> GetPagedAsync(ProductFilterParameters filterParameters, CancellationToken cancellationToken = default);
|
||||
Task<IEnumerable<Product>> GetByCategoryAsync(Guid categoryId, CancellationToken cancellationToken = default);
|
||||
Task<IEnumerable<Product>> GetCustomizableAsync(CancellationToken cancellationToken = default);
|
||||
Task<Product> AddAsync(Product product, CancellationToken cancellationToken = default);
|
||||
Task<Product> UpdateAsync(Product product, CancellationToken cancellationToken = default);
|
||||
Task DeleteAsync(Guid id, CancellationToken cancellationToken = default);
|
||||
Task<bool> ExistsAsync(Guid id, CancellationToken cancellationToken = default);
|
||||
}
|
||||
Reference in New Issue
Block a user