Add PocketBase client with contracts and sharp build tooling

This commit is contained in:
tleininger committed 2026-09-22 19:32:32 +02:00
1 parent 56922707ea
commit 251f2d818b
24 files changed
+578 -20

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
using System.Text.Json.Serialization;
namespace Elternbeirat.Contracts;
/// <summary>A calendar entry. Sorted by <see cref="Start"/>.</summary>
public record Event
{
/// <summary>PocketBase record id.</summary>
[JsonPropertyName("id")]
public string Id { get; init; } = "";
/// <summary>
/// Start of the event with date and time. Stored as UTC by PocketBase but
/// read as local time (Europe/Berlin) by convention. An all-day event uses
/// 00:00 as the time.
/// </summary>
[JsonPropertyName("start")]
public DateTime Start { get; init; }
/// <summary>Optional end of the event; null when unset.</summary>
[JsonPropertyName("end")]
public DateTime? End { get; init; }
/// <summary>Event name, e.g. "Elternbeiratssitzung".</summary>
[JsonPropertyName("title")]
public string Title { get; init; } = "";
/// <summary>Optional location, e.g. "Aula".</summary>
[JsonPropertyName("location")]
public string Location { get; init; } = "";
/// <summary>Optional note, e.g. "Anmeldung erforderlich".</summary>
[JsonPropertyName("note")]
public string Note { get; init; } = "";
/// <summary>Whether the event is visible to visitors.</summary>
[JsonPropertyName("public")]
public bool Public { get; init; }
}