diff --git a/OliverBooth/Data/Blog/BlogPost.cs b/OliverBooth/Data/Blog/BlogPost.cs index effc376..6580b3b 100644 --- a/OliverBooth/Data/Blog/BlogPost.cs +++ b/OliverBooth/Data/Blog/BlogPost.cs @@ -23,12 +23,24 @@ public sealed class BlogPost : IEquatable /// The ID. public int Id { get; private set; } + /// + /// Gets or sets a value indicating whether the blog post is a redirect. + /// + /// if the blog post is a redirect; otherwise, . + public bool IsRedirect { get; set; } + /// /// Gets or sets the date and time at which the blog post was published. /// /// The publish timestamp. public DateTimeOffset Published { get; set; } + /// + /// Gets or sets the redirect URL of the blog post. + /// + /// The redirect URL. + public string? RedirectUrl { get; set; } + /// /// Gets or sets the URL slug of the blog post. /// diff --git a/OliverBooth/Data/Blog/Configuration/BlogPostConfiguration.cs b/OliverBooth/Data/Blog/Configuration/BlogPostConfiguration.cs index 3db6c2c..8cca95b 100644 --- a/OliverBooth/Data/Blog/Configuration/BlogPostConfiguration.cs +++ b/OliverBooth/Data/Blog/Configuration/BlogPostConfiguration.cs @@ -22,5 +22,7 @@ internal sealed class BlogPostConfiguration : IEntityTypeConfiguration builder.Property(e => e.Updated).IsRequired(false); builder.Property(e => e.Title).HasMaxLength(255).IsRequired(); builder.Property(e => e.Body).IsRequired(); + builder.Property(e => e.IsRedirect).IsRequired(); + builder.Property(e => e.RedirectUrl).IsRequired(false); } }