mirror of
https://github.com/FalloutCollaborationProject/FCP-Mod-Updater.git
synced 2026-07-27 17:04:05 -07:00
Version 1.0
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
namespace FCPModUpdater.Models;
|
||||
|
||||
public record GitCommitInfo(
|
||||
string Hash,
|
||||
string ShortHash,
|
||||
string Message,
|
||||
string Author,
|
||||
DateTimeOffset Date
|
||||
);
|
||||
@@ -0,0 +1,17 @@
|
||||
namespace FCPModUpdater.Models;
|
||||
|
||||
public record InstalledMod
|
||||
{
|
||||
public required string Name { get; init; }
|
||||
public required string Path { get; init; }
|
||||
public required ModSource Source { get; init; }
|
||||
public string? RemoteUrl { get; init; }
|
||||
public string? Branch { get; init; }
|
||||
public GitCommitInfo? CurrentCommit { get; init; }
|
||||
public ModStatus Status { get; init; }
|
||||
public int CommitsBehind { get; init; }
|
||||
public int CommitsAhead { get; init; }
|
||||
public string? MatchedRepoName { get; init; }
|
||||
public string? ErrorMessage { get; init; }
|
||||
public bool HasLocalChanges { get; init; }
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
namespace FCPModUpdater.Models;
|
||||
|
||||
public enum ModStatus
|
||||
{
|
||||
UpToDate,
|
||||
Behind,
|
||||
Ahead,
|
||||
Diverged,
|
||||
LocalChanges,
|
||||
NonGit,
|
||||
Error,
|
||||
Unknown
|
||||
}
|
||||
|
||||
public enum ModSource
|
||||
{
|
||||
Git,
|
||||
Local,
|
||||
Workshop
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace FCPModUpdater.Models;
|
||||
|
||||
public record RemoteRepo(
|
||||
[property: JsonPropertyName("name")] string Name,
|
||||
[property: JsonPropertyName("clone_url")] string CloneUrl,
|
||||
[property: JsonPropertyName("ssh_url")] string SshUrl,
|
||||
[property: JsonPropertyName("default_branch")] string DefaultBranch,
|
||||
[property: JsonPropertyName("description")] string? Description,
|
||||
[property: JsonPropertyName("html_url")] string HtmlUrl
|
||||
);
|
||||
Reference in New Issue
Block a user