43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace Elternbeirat.Contracts;
|
|
|
|
/// <summary>
|
|
/// A single question and answer of the FAQ, as stored in PocketBase.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// On the FAQ page, entries are grouped by <see cref="Topic"/>.
|
|
/// </remarks>
|
|
public record Faq
|
|
{
|
|
/// <summary>
|
|
/// Gets the PocketBase record id.
|
|
/// </summary>
|
|
[JsonPropertyName("id")]
|
|
public string Id { get; init; } = "";
|
|
|
|
/// <summary>
|
|
/// Gets the question as a parent would phrase it.
|
|
/// </summary>
|
|
[JsonPropertyName("question")]
|
|
public string Question { get; init; } = "";
|
|
|
|
/// <summary>
|
|
/// Gets the answer as Markdown.
|
|
/// </summary>
|
|
[JsonPropertyName("answer")]
|
|
public string Answer { get; init; } = "";
|
|
|
|
/// <summary>
|
|
/// Gets the topic the question is grouped under, e.g. <c>"mensa"</c>.
|
|
/// </summary>
|
|
[JsonPropertyName("topic")]
|
|
public string Topic { get; init; } = "";
|
|
|
|
/// <summary>
|
|
/// Gets a value indicating whether the question is visible to visitors of the site.
|
|
/// </summary>
|
|
[JsonPropertyName("public")]
|
|
public bool Public { get; init; }
|
|
}
|