2009-11-25 01:34:23 +00:00
|
|
|
using System;
|
2009-11-25 23:12:19 +00:00
|
|
|
using Orchard.Core.Common.Models;
|
2009-11-20 23:31:49 +00:00
|
|
|
using Orchard.Models;
|
2009-11-25 23:12:19 +00:00
|
|
|
using Orchard.Security;
|
2009-11-20 23:31:49 +00:00
|
|
|
|
|
|
|
namespace Orchard.Blogs.Models {
|
2009-11-21 09:47:18 +00:00
|
|
|
public class BlogPost : ContentPart<BlogPostRecord> {
|
2009-11-29 06:08:46 +00:00
|
|
|
public readonly static ContentType ContentType = new ContentType { Name = "blogpost", DisplayName = "Blog Post" };
|
|
|
|
|
2009-11-26 00:41:00 +00:00
|
|
|
public Blog Blog { get; set; }
|
2009-11-25 23:12:19 +00:00
|
|
|
public string Title { get { return this.As<RoutableAspect>().Title; } }
|
2009-11-30 20:15:52 +00:00
|
|
|
public string Body { get { return this.As<BodyAspect>().Record.Body; } }
|
2009-11-25 23:12:19 +00:00
|
|
|
public string Slug { get { return this.As<RoutableAspect>().Slug; } }
|
|
|
|
public IUser Creator { get { return this.As<CommonAspect>().OwnerField.Value; } }
|
2009-11-25 01:34:23 +00:00
|
|
|
public DateTime? Published { get { return Record.Published; } }
|
2009-11-20 23:31:49 +00:00
|
|
|
}
|
|
|
|
}
|