58 lines
1.7 KiB
C#
58 lines
1.7 KiB
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace TheCr3w.Shared.Models;
|
|
|
|
/// <summary>
|
|
/// Kanoniczny model metadanych wydania aplikacji natywnej (Android & Windows)
|
|
/// używany do wyliczania i weryfikacji podpisu cyfrowego Ed25519.
|
|
/// </summary>
|
|
public class ReleaseMetadata
|
|
{
|
|
[JsonPropertyName("release_id")]
|
|
public Guid ReleaseId { get; set; }
|
|
|
|
[JsonPropertyName("app_id")]
|
|
public string AppId { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("version")]
|
|
public string Version { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("version_code")]
|
|
public int VersionCode { get; set; }
|
|
|
|
[JsonPropertyName("platform")]
|
|
public string Platform { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("architecture")]
|
|
public string Architecture { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("channel")]
|
|
public string Channel { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("mandatory")]
|
|
public bool Mandatory { get; set; }
|
|
|
|
[JsonPropertyName("minimum_supported_version")]
|
|
public string MinimumSupportedVersion { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("file_size")]
|
|
public long FileSize { get; set; }
|
|
|
|
[JsonPropertyName("sha256")]
|
|
public string Sha256 { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("published_at")]
|
|
public DateTimeOffset PublishedAt { get; set; }
|
|
|
|
[JsonPropertyName("release_notes")]
|
|
public string ReleaseNotes { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("download_url")]
|
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
|
public string? DownloadUrl { get; set; }
|
|
|
|
[JsonPropertyName("signature_ed25519")]
|
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
|
public string? SignatureEd25519 { get; set; }
|
|
}
|
|
|