wabbajack/Wabbajack.DTOs/ModListStatus/ModListSummary.cs

30 lines
1.1 KiB
C#
Raw Normal View History

2022-05-15 03:05:55 +00:00
using System;
2021-09-27 12:42:46 +00:00
using System.Text.Json.Serialization;
2021-10-23 16:51:17 +00:00
namespace Wabbajack.DTOs;
public class ModListSummary
2021-09-27 12:42:46 +00:00
{
2021-10-23 16:51:17 +00:00
[JsonPropertyName("name")] public string Name { get; set; } = string.Empty;
2021-09-27 12:42:46 +00:00
2021-10-23 16:51:17 +00:00
[JsonPropertyName("machineURL")] public string MachineURL { get; set; } = string.Empty;
2021-09-27 12:42:46 +00:00
2021-10-23 16:51:17 +00:00
[JsonPropertyName("failed")] public int Failed { get; set; }
2021-09-27 12:42:46 +00:00
2021-10-23 16:51:17 +00:00
[JsonPropertyName("passed")] public int Passed { get; set; }
2021-09-27 12:42:46 +00:00
2021-10-23 16:51:17 +00:00
[JsonPropertyName("updating")] public int Updating { get; set; }
2021-09-27 12:42:46 +00:00
2021-10-23 16:51:17 +00:00
[JsonPropertyName("mirrored")] public int Mirrored { get; set; }
2021-09-27 12:42:46 +00:00
2021-10-23 16:51:17 +00:00
[JsonPropertyName("link")] public string Link => $"reports/{MachineURL}/status.json";
2021-09-27 12:42:46 +00:00
2021-10-23 16:51:17 +00:00
[JsonPropertyName("report")] public string Report => $"reports/{MachineURL}/status.md";
2021-09-27 12:42:46 +00:00
2021-10-23 16:51:17 +00:00
[JsonPropertyName("modlist_missing")] public bool ModListIsMissing { get; set; }
2021-09-27 12:42:46 +00:00
2021-10-23 16:51:17 +00:00
[JsonPropertyName("has_failures")] public bool HasFailures => Failed > 0 || ModListIsMissing;
2022-05-15 03:05:55 +00:00
2022-05-15 04:33:17 +00:00
[JsonPropertyName("small_image")] public Uri SmallImage { get; set; }
[JsonPropertyName("large_image")] public Uri LargeImage { get; set; }
2021-09-27 12:42:46 +00:00
}