first commit
This commit is contained in:
20
BookHive/Models/Book.cs
Normal file
20
BookHive/Models/Book.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
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; }
|
||||
}
|
||||
Reference in New Issue
Block a user