37 lines
988 B
C#
37 lines
988 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Text;
|
|
|
|
namespace Webzine.Entity
|
|
{
|
|
/// <summary>
|
|
/// Classe représentant un commentaire laissé par un utilisateur sur un titre.
|
|
/// Lien avec l'entité <see cref="Titre"/> : un titre peut avoir plusieurs commentaires, mais un commentaire n'a qu'un seul titre.
|
|
/// </summary>
|
|
public class Commentaire
|
|
{
|
|
public int IdCommentaire { get; set; }
|
|
|
|
[Required]
|
|
[MinLength(10)]
|
|
[MaxLength(1000)]
|
|
[Display(Name = "Commentaire")]
|
|
public string Contenu { get; set; }
|
|
|
|
[Required]
|
|
[MinLength(2)]
|
|
[MaxLength(30)]
|
|
[Display(Name = "Nom")]
|
|
public string Auteur { get; set; }
|
|
|
|
[Required]
|
|
[Display(Name = "Date de création")]
|
|
public DateTime DateCreation { get; set; }
|
|
|
|
public int IdTitre { get; set; }
|
|
|
|
public Titre Titre { get; set; }
|
|
}
|
|
}
|