using System.Text.Json.Serialization; namespace Elternbeirat.Contracts; /// /// A single question and answer of the FAQ, as stored in PocketBase. /// /// /// On the FAQ page, entries are grouped by . /// public record Faq { /// /// Gets the PocketBase record id. /// /// /// : every stored record has an id. Modeling it as /// required states which fields a record must carry, independent of the store, /// so a future data source has to supply them too. /// [JsonPropertyName("id")] public required string Id { get; init; } /// /// Gets the question as a parent would phrase it. /// /// /// : a FAQ entry without a question is incomplete, and /// the field is required in PocketBase. /// [JsonPropertyName("question")] public required string Question { get; init; } /// /// Gets the answer as Markdown. /// /// /// : a FAQ entry exists to answer its question, so an /// entry without an answer is incomplete. The field is required in PocketBase. /// [JsonPropertyName("answer")] public required string Answer { get; init; } /// /// Gets the topic the question is grouped under, e.g. "mensa". /// /// /// : the FAQ page groups entries by topic, so an entry /// without one has no place. The field is required in PocketBase. /// [JsonPropertyName("topic")] public required string Topic { get; init; } }