2009-11-25 01:34:23 +00:00
|
|
|
using System;
|
2009-12-09 23:07:00 +00:00
|
|
|
using System.Web.Mvc;
|
2010-01-10 11:18:28 +00:00
|
|
|
using Orchard.ContentManagement.Aspects;
|
2009-11-25 23:12:19 +00:00
|
|
|
using Orchard.Core.Common.Models;
|
2009-12-21 20:29:53 +00:00
|
|
|
using Orchard.ContentManagement;
|
2009-11-25 23:12:19 +00:00
|
|
|
using Orchard.Security;
|
2009-11-20 23:31:49 +00:00
|
|
|
|
|
|
|
namespace Orchard.Blogs.Models {
|
2010-01-11 21:05:24 +00:00
|
|
|
public class BlogPost : ContentPart {
|
2009-12-09 23:07:00 +00:00
|
|
|
[HiddenInput(DisplayValue = false)]
|
2009-12-01 20:24:18 +00:00
|
|
|
public int Id { get { return ContentItem.Id; } }
|
2009-12-09 23:07:00 +00:00
|
|
|
|
2009-12-10 00:03:10 +00:00
|
|
|
public string Title {
|
|
|
|
get { return this.As<RoutableAspect>().Title; }
|
|
|
|
}
|
2009-12-09 23:07:00 +00:00
|
|
|
|
2009-12-10 00:03:10 +00:00
|
|
|
public string Slug {
|
|
|
|
get { return this.As<RoutableAspect>().Slug; }
|
2010-01-15 23:44:22 +00:00
|
|
|
set { this.As<RoutableAspect>().Slug = value; }
|
2009-12-10 00:03:10 +00:00
|
|
|
}
|
2009-12-09 23:07:00 +00:00
|
|
|
|
2009-12-10 01:49:09 +00:00
|
|
|
public Blog Blog {
|
2010-01-10 11:18:28 +00:00
|
|
|
get { return this.As<ICommonAspect>().Container.As<Blog>(); }
|
|
|
|
set { this.As<ICommonAspect>().Container = value; }
|
2009-12-10 00:03:10 +00:00
|
|
|
}
|
2009-12-09 23:07:00 +00:00
|
|
|
|
2009-12-10 00:03:10 +00:00
|
|
|
public IUser Creator {
|
2010-01-10 11:18:28 +00:00
|
|
|
get { return this.As<ICommonAspect>().Owner; }
|
|
|
|
set { this.As<ICommonAspect>().Owner = value; }
|
2009-12-10 00:03:10 +00:00
|
|
|
}
|
2009-12-09 23:07:00 +00:00
|
|
|
|
|
|
|
public DateTime? Published
|
|
|
|
{
|
2010-01-11 21:05:24 +00:00
|
|
|
get { return this.As<CommonAspect>().PublishedUtc; }
|
|
|
|
set { this.As<CommonAspect>().PublishedUtc = value; }
|
2009-12-09 23:07:00 +00:00
|
|
|
}
|
2009-11-20 23:31:49 +00:00
|
|
|
}
|
|
|
|
}
|