public Article(string title, ArticleType articleType, string content) { this.Title = title; this.ArticleType = articleType; this.Content = content; this.CreateTime = DateTimeOffset.Now; this.Hits = 0; this.ArticleMessages = new List <ArticleMessage>(); }
public Article(int id, string author, string title, string textSection, string content, ArticleType articleType, bool isDraft, bool isSendEmail) { Id = id; Title = title; ArticleType = articleType; Author = author; Content = content; IsDraft = isDraft; TextSection = textSection; IsSendEmail = isSendEmail; }
public Article(int id, string title, string author, string textSection, ArticleType articleType, bool isDraft, int praiseCount, int browserCount, string commentIds, DateTime createTime) { Id = id; Title = title; Author = author; ArticleType = articleType; TextSection = textSection; IsDraft = isDraft; PraiseCount = praiseCount; BrowserCount = browserCount; CommentIds = commentIds; CreateTime = createTime; }
public Article(int id, string author, string title, string textSection, string content, ArticleType articleType, bool isDraft, int praiseCount, int browserCount, DateTime createTime, DateTime?updateTime) { Id = id; Title = title; TextSection = textSection; ArticleType = articleType; Author = author; Content = content; IsDraft = isDraft; PraiseCount = praiseCount; BrowserCount = browserCount; CreateTime = createTime; UpdateTime = updateTime; }
public Article(int id, string title, string author, string content, ArticleType articleType, bool isDraft, IList <Comment> comments, DateTime createTime) { Id = id; Title = title; Author = author; ArticleType = articleType; Content = content; IsDraft = isDraft; CreateTime = createTime; Comments = comments; if (comments != null) { CommentIds = string.Join(',', comments.Select(s => s.Guid)); } }
public Article(int id, string title, ArticleType articleType) { Id = id; Title = title; ArticleType = articleType; }
public void ChangeArticleType(ArticleType articleType) { this.ArticleType = articleType; }