using LDBproject.Entities.Enums;

namespace LDBproject.Entities;

public class Book
{
    public int BookID { get; private set; }
    public string Title { get; private set; }
    public string Author { get; private set; }
    public int PublishYear { get; private set; }
    public BookStat Status { get; private set; }
    public Genres GenreMask { get; private set; } = Genres.None;

    public static Book AddBook(
        int bookIndex, string title, string author, int year, Genres genres, BookStat status)
    {
        return new Book
        {
            BookID = bookIndex,
            Title = title,
            Author = author,
            PublishYear = year,
            GenreMask = genres,
            Status = status
        };
    }
}