diff options
| author | Jake Mannens <jake@asger.xyz> | 2026-04-30 00:37:15 +1000 |
|---|---|---|
| committer | Jake Mannens <jake@asger.xyz> | 2026-05-06 04:26:12 +1000 |
| commit | 9d90e21684eeaab3ac9f89a1d8013168a1d577d7 (patch) | |
| tree | c3a03b37b693b1f38dabb58740b148bb770db551 /ApiModels.cs | |
v0.13av0.13a
Diffstat (limited to 'ApiModels.cs')
| -rw-r--r-- | ApiModels.cs | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/ApiModels.cs b/ApiModels.cs new file mode 100644 index 0000000..2738c83 --- /dev/null +++ b/ApiModels.cs @@ -0,0 +1,48 @@ +using System.Text.Json.Serialization; + +namespace HyperBooru.ApiModels; + +public enum PathType { + Windows, + Unix +} + +public record Media { + public Guid MediaId { get; init; } + public string? ShortDescription { get; init; } + public string? LongDescription { get; init; } +} + +public record UploadedFile { + public Guid UploadedFileId { get; init; } + public Guid MediaId { get; init; } + public string Checksum { get; init; } + public bool ChecksumVerified { get; init; } + public string? Filename { get; init; } + public long Length { get; init; } + public string MimeType { get; init; } + public int? Width { get; init; } + public int? Height { get; init; } + public DateTime UploadTime { get; init; } + public DateTime? LastAccessTime { get; init; } + public DateTime? LastWriteTime { get; init; } + public DateTime? CreateTime { get; init; } + public string? Path { get; init; } + [JsonConverter(typeof(JsonStringEnumConverter))] + public PathType? PathType { get; init; } +} + +public record TagDefinition { + public Guid TagDefinitionId { get; init; } + public string? Namespace { get; init; } + public string Name { get; init; } + public string? Alias { get; init; } + public Guid[] ImplicitTags { get; init; } +} + +public record OcrData { + public Guid MediaId { get; init; } + public string Text { get; init; } + public string SearchableText { get; init; } + public DateTime Timestamp { get; init; } +} |
