* Web.csproj: * Web.config: * Blog.cs: * Index.aspx: * BBCodeHelper.cs: * Comment.cs: * yavscModel.csproj: * BlogEntry.cs: * UserPost.aspx: * UserPosts.aspx: * Estimate.cs: * RemovePost.aspx: * TitleNotFound.aspx: * BlogProvider.cs: * AccountController.cs: * BlogsApiController.cs: * WorkFlowController.cs: * BlogEditEntryModel.cs: * FindBlogEntryFlags.cs: * BlogEntryCollection.cs: * Comment.cs: * BlogEditCommentModel.cs: * NpgsqlBlogProvider.cs: * NpgsqlContentProvider.cs: * BlogEntry.cs: * NpgsqlBlogProvider.csproj: * NpgsqlMembershipProvider.cs: * FindBlogEntryFlags.cs: * BlogEntryCollection.cs: * BlogHelper.cs: refactoring: moving code from NpgsqlBlogProvider to yavscModel.Blogs * BlogManager.cs: NpgsqlBlogProvider/BlogHelper.cs * BlogsController.cs: a successfull confirmed removal * Blog.cs: refactoring
88 lines
1.5 KiB
C#
88 lines
1.5 KiB
C#
using System;
|
|
using System.Configuration;
|
|
using System.ComponentModel;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace yavscModel.Blogs
|
|
{
|
|
public class BlogEntry {
|
|
long id;
|
|
[DisplayName("Identifiant numérique de billet")]
|
|
public long Id {
|
|
get {
|
|
return id;
|
|
}
|
|
set {
|
|
id = value;
|
|
}
|
|
}
|
|
|
|
string 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;
|
|
|
|
[DisplayName("Corps du billet")]
|
|
[Required(ErrorMessage = "S'il vous plait, saisissez un texte.")]
|
|
public string Content {
|
|
get {
|
|
return content;
|
|
}
|
|
set {
|
|
content = value;
|
|
}
|
|
}
|
|
|
|
string userName;
|
|
|
|
[StringLength(255)]
|
|
[DisplayName("Nom de l'auteur")]
|
|
public string UserName {
|
|
get {
|
|
return userName;
|
|
}
|
|
set {
|
|
userName = value;
|
|
}
|
|
}
|
|
|
|
public DateTime posted;
|
|
|
|
[DisplayName("Date de creation")]
|
|
public DateTime Posted {
|
|
get {
|
|
return posted;
|
|
}
|
|
set {
|
|
posted = value;
|
|
}
|
|
}
|
|
|
|
public DateTime modified;
|
|
|
|
[DisplayName("Date de modification")]
|
|
public DateTime Modified {
|
|
get {
|
|
return modified;
|
|
}
|
|
set {
|
|
modified = value;
|
|
}
|
|
}
|
|
public bool Visible { get; set ; }
|
|
public string [] Tags { get; set ; }
|
|
}
|
|
|
|
}
|