You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.2 KiB
49 lines
1.2 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Entity
|
|
{
|
|
public class Quote
|
|
{
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
public int Id { get; set; }
|
|
|
|
[Required]
|
|
[StringLength(50)]
|
|
public string Content { get; set; }
|
|
|
|
[Required]
|
|
public int Likes { get; set; }
|
|
|
|
[Required]
|
|
public LangEnum Langage { get; set; }
|
|
|
|
[Required]
|
|
public bool IsValid { get; set; }
|
|
|
|
[Required]
|
|
[ForeignKey(nameof(Character))]
|
|
public int IdCharacter { get; set; }
|
|
|
|
[Required]
|
|
[ForeignKey(nameof(Source))]
|
|
public int IdSource { get; set; }
|
|
|
|
[Required]
|
|
[ForeignKey(nameof(Users))]
|
|
public int IdUsersPropose { get; set; }
|
|
|
|
public ICollection<DailyQuote> DailyQuotes { get; set; } = new List<DailyQuote>();
|
|
|
|
public ICollection<Commentary> commentaries { get; set; } = new List<Commentary>();
|
|
|
|
public ICollection<Users> Favorite { get; } = new List<Users>();
|
|
}
|
|
}
|