Files
TP-Fluent/BookHive/Models/Book.cs
2026-03-17 10:27:53 +01:00

20 lines
662 B
C#

using System.ComponentModel.DataAnnotations;
namespace BookHive.Models;
public class Book
{
[Key] public int Id { get; set; }
[Required, MaxLength(200)] public string? Title { get; set; }
[Required] public string? Isbn { get; set; }
[MaxLength(3000)] public string? Summary { get; set; }
[Required] public int PageCount { get; set; }
[Required] public DateOnly PublishedDate { get; set; }
[Required, MaxLength(50)] public string? Genre { get; set; }
public Author? Author { get; set; }
[Required] public int AuthorId { get; set; }
public List<Loan>? Loans { get; set; }
public List<Review>? Reviews { get; set; }
}