feat: add comment toggle schema
This commit is contained in:
parent
8b2f0fb454
commit
6f3961901e
@ -1,4 +1,4 @@
|
||||
namespace OliverBooth.Data.Blog;
|
||||
namespace OliverBooth.Data.Blog;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a blog post.
|
||||
@ -17,6 +17,12 @@ public sealed class BlogPost : IEquatable<BlogPost>
|
||||
/// <value>The body.</value>
|
||||
public string Body { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether comments are enabled for the blog post.
|
||||
/// </summary>
|
||||
/// <value><see langword="true" /> if comments are enabled; otherwise, <see langword="false" />.</value>
|
||||
public bool EnableComments { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the 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;
|
||||
@ -24,5 +24,6 @@ internal sealed class BlogPostConfiguration : IEntityTypeConfiguration<BlogPost>
|
||||
builder.Property(e => e.Body).IsRequired();
|
||||
builder.Property(e => e.IsRedirect).IsRequired();
|
||||
builder.Property(e => e.RedirectUrl).IsRequired(false);
|
||||
builder.Property(e => e.EnableComments).IsRequired();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user