using System.Text.Json.Serialization; namespace Elternbeirat.Contracts; /// /// A content page of the site, as stored in PocketBase. /// /// /// Pages also drive the site navigation: and /// decide where and in which order a page appears in the /// header or footer menu. lists dynamic blocks rendered /// below the page body. /// public record Page { /// /// Gets the PocketBase record id. /// [JsonPropertyName("id")] public string Id { get; init; } = ""; /// /// Gets the heading shown to visitors. /// /// /// Free text; may contain umlauts and spaces. For the URL, see . /// [JsonPropertyName("title")] public string Title { get; init; } = ""; /// /// Gets the page body as Markdown. /// [JsonPropertyName("body")] public string Body { get; init; } = ""; /// /// Gets the navigation menu the page appears in. /// /// /// Either "header" or "footer". /// [JsonPropertyName("location")] public string Location { get; init; } = ""; /// /// Gets the sort order within the navigation menu given by . /// /// /// The sort key; pages with smaller values appear first. /// [JsonPropertyName("order")] public double Order { get; init; } /// /// Gets the URL slug of the page, e.g. "board" for /board. /// /// /// A lowercase path segment without umlauts. /// [JsonPropertyName("slug")] public string Slug { get; init; } = ""; /// /// Gets the dynamic blocks rendered below the . /// /// /// Any of "posts", "events" and "faqs", or an empty list /// for a plain text page. /// [JsonPropertyName("embed")] public IReadOnlyList Embed { get; init; } = []; /// /// Gets a value indicating whether the page is visible to visitors of the site. /// [JsonPropertyName("public")] public bool Public { get; init; } }