Version 1.0

This commit is contained in:
Canon
2026-02-04 09:00:07 +08:00
commit 4c8b6cdd9f
25 changed files with 2407 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
namespace FCPModUpdater.Models;
public record GitCommitInfo(
string Hash,
string ShortHash,
string Message,
string Author,
DateTimeOffset Date
);
+17
View File
@@ -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; }
}
+20
View File
@@ -0,0 +1,20 @@
namespace FCPModUpdater.Models;
public enum ModStatus
{
UpToDate,
Behind,
Ahead,
Diverged,
LocalChanges,
NonGit,
Error,
Unknown
}
public enum ModSource
{
Git,
Local,
Workshop
}
+12
View File
@@ -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
);