feat: add Updated property to BlogPost
This commit is contained in:
parent
2aa218d105
commit
0c594ac306
@ -1,4 +1,4 @@
|
||||
namespace OliverBooth.Data.Blog;
|
||||
namespace OliverBooth.Data.Blog;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a blog post.
|
||||
@ -41,6 +41,12 @@ public sealed class BlogPost : IEquatable<BlogPost>
|
||||
/// <value>The title.</value>
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the date and time at which the blog post was updated.
|
||||
/// </summary>
|
||||
/// <value>The update timestamp.</value>
|
||||
public DateTimeOffset? Updated { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the legacy WordPress ID of the blog post.
|
||||
/// </summary>
|
||||
|
@ -1,4 +1,4 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace OliverBooth.Data.Blog.Configuration;
|
||||
@ -19,6 +19,7 @@ internal sealed class BlogPostConfiguration : IEntityTypeConfiguration<BlogPost>
|
||||
builder.Property(e => e.Slug).HasMaxLength(100).IsRequired();
|
||||
builder.Property(e => e.AuthorId).IsRequired();
|
||||
builder.Property(e => e.Published).IsRequired();
|
||||
builder.Property(e => e.Updated).IsRequired(false);
|
||||
builder.Property(e => e.Title).HasMaxLength(255).IsRequired();
|
||||
builder.Property(e => e.Body).IsRequired();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user