using Ardalis.Specification;
using BookHive.Models;

namespace BookHive.Specifications.Books;

public class GetBookByIdSpec : SingleResultSpecification<Book>
{
    public GetBookByIdSpec(int bookId)
    {
        Query
            .Include(x => x.Author)
            .Include(x => x.Reviews)!
            .ThenInclude(x => x.Member)
            .Where(x => x.Id == bookId);
    }
}