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.
WF-PmAPI/WF_EF_Api/Entity/Quote.cs

55 lines
1.4 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 Users? User { get; set; } = null!;
public Source Source { get; set; } = null!;
public Character Character { get; set; } = null!;
public ICollection<DailyQuote> DailyQuotes { get; set; } = new List<DailyQuote>();
public ICollection<Commentary> commentaries { get; set; } = new List<Commentary>();
public ICollection<Favorite> Favorite { get; set; } = new List<Favorite>();
}
}