Initial import
This commit is contained in:
parent
0c865416ca
commit
04804b89a9
279 changed files with 12945 additions and 0 deletions
26
NpgsqlBlogProvider/DataModel/Blog.cs
Normal file
26
NpgsqlBlogProvider/DataModel/Blog.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using System.Configuration;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Npgsql.Web.Blog.DataModel
|
||||
{
|
||||
public class Blog
|
||||
{
|
||||
string title;
|
||||
|
||||
[StringValidator(MaxLength=512)]
|
||||
[Required]
|
||||
[DisplayName("Titre")]
|
||||
public string Title {
|
||||
get {
|
||||
return title;
|
||||
}
|
||||
set {
|
||||
title = value;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
91
NpgsqlBlogProvider/DataModel/BlogEntry.cs
Normal file
91
NpgsqlBlogProvider/DataModel/BlogEntry.cs
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
using System;
|
||||
using System.Configuration;
|
||||
using System.Configuration.Provider;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Npgsql.Web.Blog.DataModel
|
||||
{
|
||||
public class BlogEntry
|
||||
{
|
||||
long id;
|
||||
[DisplayName("Identifiant numérique de billet")]
|
||||
public long Id {
|
||||
get {
|
||||
return id;
|
||||
}
|
||||
set {
|
||||
id = value;
|
||||
}
|
||||
}
|
||||
|
||||
string title;
|
||||
|
||||
[StringValidator(MaxLength=512)]
|
||||
[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;
|
||||
|
||||
[StringValidator(MaxLength=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 ; }
|
||||
}
|
||||
|
||||
}
|
||||
12
NpgsqlBlogProvider/DataModel/BlogEntryCollection.cs
Normal file
12
NpgsqlBlogProvider/DataModel/BlogEntryCollection.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
using System.Configuration;
|
||||
using System.Configuration.Provider;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Npgsql.Web.Blog.DataModel
|
||||
{
|
||||
public class BlogEntryCollection : List<BlogEntry>
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
76
NpgsqlBlogProvider/DataModel/Comment.cs
Normal file
76
NpgsqlBlogProvider/DataModel/Comment.cs
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
using System;
|
||||
using System.Configuration;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Npgsql.Web.Blog.DataModel
|
||||
{
|
||||
public class Comment
|
||||
{
|
||||
long id;
|
||||
[DisplayName("Identifiant numérique de commentaire")]
|
||||
public long Id {
|
||||
get {
|
||||
return id;
|
||||
}
|
||||
set {
|
||||
id = value;
|
||||
}
|
||||
}
|
||||
long postid;
|
||||
[DisplayName("Identifiant numérique du billet commenté")]
|
||||
public long PostId {
|
||||
get {
|
||||
return postid;
|
||||
}
|
||||
set {
|
||||
postid = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the author of this comment.
|
||||
/// </summary>
|
||||
/// <value>From.</value>
|
||||
public string From { get; set; }
|
||||
|
||||
string content;
|
||||
[DisplayName("Contenu")]
|
||||
[Required(ErrorMessage = "S'il vous plait, saisissez un contenu")]
|
||||
public string CommentText {
|
||||
get {
|
||||
return content;
|
||||
}
|
||||
set {
|
||||
content = 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 ; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
16
NpgsqlBlogProvider/DataModel/FindBlogEntryFlags.cs
Normal file
16
NpgsqlBlogProvider/DataModel/FindBlogEntryFlags.cs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
using System;
|
||||
using System.Configuration;
|
||||
using System.Configuration.Provider;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Npgsql.Web.Blog.DataModel
|
||||
{
|
||||
|
||||
public enum FindBlogEntryFlags : byte {
|
||||
MatchTitle = 1,
|
||||
MatchContent = 2,
|
||||
MatchUserName = 4,
|
||||
MatchInvisible = 8
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue