Hooking up create BlogPost and some other service changes to make sure getting posts is scoped to Blog.

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4042128
This commit is contained in:
ErikPorter
2009-11-25 01:34:23 +00:00
parent 8bd6e8acf4
commit 24656896da
17 changed files with 194 additions and 29 deletions

View File

@@ -1,7 +1,9 @@
using System;
using Orchard.Models;
namespace Orchard.Blogs.Models {
public class BlogPost : ContentPart<BlogPostRecord> {
public Blog Blog { get; set; }
public DateTime? Published { get { return Record.Published; } }
}
}

View File

@@ -1,19 +1,9 @@
//using System;
using System;
using Orchard.Models.Records;
using Orchard.Users.Models;
namespace Orchard.Blogs.Models {
public class BlogPostRecord : ContentPartRecord {
public virtual BlogRecord Blog { get; set; }
public virtual UserRecord Creator { get; set; }
public virtual string Title { get; set; }
public virtual string Body { get; set; }
public virtual string BodyShort { get; set; }
//TODO: (erikpo) Probably need some sort of body source type to keep track of what created the text so its available to plugins to use appropriately.
public virtual string Slug { get; set; }
public virtual DateTime? Published { get; set; }
//public virtual DateTime Created { get; set; }
//public virtual DateTime Modified { get; set; }
}
}