feat: pave the way for adding comments to tutorials

This commit is contained in:
Oliver Booth 2024-04-27 15:59:05 +01:00
parent 879ff6a295
commit 985acf7bc3
Signed by: oliverbooth
GPG Key ID: E60B570D1B7557B5
3 changed files with 12 additions and 0 deletions

View File

@ -25,5 +25,6 @@ internal sealed class TutorialArticleConfiguration : IEntityTypeConfiguration<Tu
builder.Property(e => e.NextPart);
builder.Property(e => e.PreviousPart);
builder.Property(e => e.Visibility).HasConversion<EnumToStringConverter<Visibility>>();
builder.Property(e => e.EnableComments).IsRequired();
}
}

View File

@ -11,6 +11,14 @@ public interface ITutorialArticle
/// <value>The body.</value>
string Body { get; }
/// <summary>
/// Gets a value indicating whether comments are enabled for the article.
/// </summary>
/// <value>
/// <see langword="true" /> if comments are enabled for the article; otherwise, <see langword="false" />.
/// </value>
bool EnableComments { get; }
/// <summary>
/// Gets the excerpt of this article, if it has one.
/// </summary>

View File

@ -8,6 +8,9 @@ internal sealed class TutorialArticle : IEquatable<TutorialArticle>, ITutorialAr
/// <inheritdoc />
public string Body { get; private set; } = string.Empty;
/// <inheritdoc />
public bool EnableComments { get; internal set; }
/// <inheritdoc />
public string? Excerpt { get; private set; }