Files
LazyBearWorks/Libraries/Confluence/ConfluenceModels.cs
2026-04-13 13:40:32 +03:00

39 lines
1.5 KiB
C#

using System.ComponentModel.DataAnnotations;
namespace LazyBear.Confluence;
public sealed class ConfluencePage
{
[JsonPropertyName("id")] public long Id { get; set; }
[JsonPropertyName("type")] public string Type { get; set; } = string.Empty;
[JsonPropertyName("title")] public string Title { get; set; } = string.Empty;
[JsonPropertyName("space")] public ConfluenceSpace? Space { get; set; }
[JsonPropertyName("version")] public ConfluenceVersion? Version { get; set; }
[JsonPropertyName("body")] public ConfluenceBody? Body { get; set; }
[JsonPropertyName("ancestors")] public List<ConfluencePage> Ancestors { get; set; } = new();
[JsonPropertyName("children")] public List<ConfluencePage> Children { get; set; } = new();
}
public sealed class ConfluenceSpace
{
[JsonPropertyName("key")] public string Key { get; set; } = string.Empty;
[JsonPropertyName("name")] public string Name { get; set; } = string.Empty;
}
public sealed class ConfluenceVersion
{
[JsonPropertyName("number")] public int Number { get; set; }
}
public sealed class ConfluenceBody
{
[JsonPropertyName("storage")] public BodyStorage? Storage { get; set; }
[JsonPropertyName("representation")] public string Representation { get; set; } = string.Empty;
}
public sealed class BodyStorage
{
[JsonPropertyName("value")] public string Value { get; set; } = string.Empty;
[JsonPropertyName("representation")] public string Representation { get; set; } = string.Empty;
}