using System; using System.Configuration; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using Yavsc.Model.Circles; using System.Web.Mvc; namespace Yavsc.Model.Blogs { /// /// Blog entry. /// public class BlogEntry { long id; /// /// Gets or sets the identifier. /// /// The identifier. [DisplayName("Identifiant numérique de billet")] public long Id { get { return id; } set { id = value; } } string title; /// /// Gets or sets the title. /// /// The title. [DisplayName("Titre du billet")] [StringLength(512)] [RegularExpression("^[^:%&?]*$",ErrorMessage = "Les caratères suivants sont invalides pour un titre: :%&?")] [Required(ErrorMessage = "S'il vous plait, saisissez un titre")] public string Title { get { return title; } set { title = value; } } string content; /// /// Gets or sets the content. /// /// The content. [DisplayName("Corps du billet")] [Required(ErrorMessage = "S'il vous plait, saisissez un texte.")] public string Content { get { return content; } set { content = value; } } string userName; /// /// Gets or sets the name of the user. /// /// The name of the user. [StringLength(255)] [DisplayName("Auteur")] public string Author { get { return userName; } set { userName = value; } } /// /// The posted. /// public DateTime posted; /// /// Gets or sets the posted. /// /// The posted. [DisplayName("Date de creation")] public DateTime Posted { get { return posted; } set { posted = value; } } /// /// The modified. /// public DateTime modified; /// /// Gets or sets the modified. /// /// The modified. [DisplayName("Date de modification")] public DateTime Modified { get { return modified; } set { modified = value; } } /// /// Gets or sets a value indicating whether this is visible. /// /// true if visible; otherwise, false. public bool Visible { get; set ; } /// /// Gets or sets the circles allowed to read this ticket. /// An empty collection specifies a public post. /// /// The circles. [Display(Name="Cercles autorisés")] public long[] AllowedCircles { get; set; } /// /// Gets or sets the tags. /// /// The tags. public string [] Tags { get; set ; } } }