48 lines
1.1 KiB
C#
48 lines
1.1 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.ComponentModel.DataAnnotations;
|
|||
|
using System.Linq;
|
|||
|
using System.Web;
|
|||
|
|
|||
|
namespace Book_club.Models
|
|||
|
{
|
|||
|
public class Book
|
|||
|
{
|
|||
|
[Key]
|
|||
|
public int Id { get; set; }
|
|||
|
|
|||
|
public string Name { get; set; }
|
|||
|
|
|||
|
//[MinValue(1500, "Value must be at least 1")]
|
|||
|
// [MaxValue(2020, "Value can't be more than 10")]
|
|||
|
public int YearProducktion { get; set; }
|
|||
|
|
|||
|
public int AgeLimit { get; set; }
|
|||
|
|
|||
|
public bool IsChildBook { get; set; }
|
|||
|
|
|||
|
public string Genre { get; set; }
|
|||
|
|
|||
|
public string UserId { get; set; }
|
|||
|
|
|||
|
ApplicationUser User { get; set; }
|
|||
|
|
|||
|
|
|||
|
//public Book(string name, int year, int agelimit, string genre)
|
|||
|
//{
|
|||
|
// Name = name;
|
|||
|
// YearProducktion = year;
|
|||
|
// AgeLimit = agelimit;
|
|||
|
// Genre = genre;
|
|||
|
|
|||
|
//}
|
|||
|
//public Book(string name, int agelimit, bool isChildBook)
|
|||
|
//{
|
|||
|
// Name = name;
|
|||
|
// AgeLimit = agelimit;
|
|||
|
// IsChildBook = isChildBook;
|
|||
|
|
|||
|
//}
|
|||
|
|
|||
|
}
|
|||
|
}
|