Add project files.

This commit is contained in:
Jose Conde
2025-09-04 10:14:30 +02:00
parent a7a404148c
commit 94e6ef651e
54 changed files with 3134 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
using ModVersionChecker.data.model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
public class AppConfig
{
[JsonPropertyName("id")]
public string Id { get; set; } = string.Empty;
[JsonPropertyName("name")]
public string Name { get; set; } = string.Empty;
[JsonPropertyName("msfsVersions")]
public List<string> MsfsVersions { get; set; } = new List<string> { "msfs2024" }; // Default to msfs2024
[JsonPropertyName("source")]
public string Source { get; set; } = string.Empty;
[JsonPropertyName("params")]
public Dictionary<string, string> Params { get; set; } = new Dictionary<string, string>();
[JsonPropertyName("fsFields")]
public Dictionary<string, Dictionary<string, string>> FsFields { get; set; } = new Dictionary<string, Dictionary<string, string>>();
[JsonPropertyName("downloadUrl")]
public string DownloadUrl { get; set; } = string.Empty;
[JsonPropertyName("currentVersion")]
public string CurrentVersion { get; set; } = string.Empty;
[JsonPropertyName("latestVersion")]
public string LatestVersion { get; set; } = string.Empty;
[JsonPropertyName("status")]
public AppStatus Status { get; set; } = AppStatus.None;
[JsonPropertyName("createdAt")]
public long CreatedAt { get; set; } = 0;
[JsonPropertyName("updatedAt")]
public long UpdatedAt { get; set; } = 0;
[JsonPropertyName("lastCheckedAt")]
public long LastCheckedAt { get; set; } = 0;
}

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ModVersionChecker.data.model
{
public enum AppStatus
{
None,
UpdateAvailable,
Error,
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
namespace ModVersionChecker.data.model
{
public class CheckerTypeDef
{
[JsonPropertyName("name")]
public string Name { get; set; } = string.Empty;
[JsonPropertyName("params")]
public List<FieldDef> Params { get; set; } = new List<FieldDef>();
}
}

View File

@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
namespace ModVersionChecker.data.model
{
public class FieldDef
{
[JsonPropertyName("name")]
public string Name { get; set; } = string.Empty;
[JsonPropertyName("label")]
public string Label { get; set; } = string.Empty;
[JsonPropertyName("type")]
public string Type { get; set; } = string.Empty;
[JsonPropertyName("required")]
public bool Required { get; set; } = false;
[JsonPropertyName("control")]
public string Control { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
namespace ModVersionChecker.data.model
{
public class FsModPathConfig
{
public string Id { get; set; } = String.Empty;
[JsonPropertyName("name")]
public string Name { get; set; } = string.Empty;
[JsonPropertyName("shortName")]
public string ShortName { get; set; } = string.Empty;
[JsonPropertyName("path")]
public string Path { get; set; } = string.Empty;
[JsonPropertyName("file")]
public string File { get; set; } = string.Empty;
[JsonPropertyName("fileType")]
public string FileType { get; set; } = string.Empty;
[JsonPropertyName("key")]
public string Key { get; set; } = string.Empty;
[JsonPropertyName("fields")]
public List<FieldDef> Fields { get; set; } = new List<FieldDef>();
}
}

View File

@@ -0,0 +1,21 @@
using LiteDB;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
namespace ModVersionChecker.data.model
{
public class GlobalConfig
{
public string Id { get; set; } = String.Empty;
[JsonPropertyName("intervalMinutes")]
public int IntervalMinutes { get; set; } = 60;
[JsonPropertyName("checkOnStartup")]
public bool CheckOnStartup { get; set; } = true;
}
}

View File

@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
namespace ModVersionChecker.data.model
{
public class SourceDef
{
[JsonPropertyName("id")]
public string Id { get; set; } = string.Empty;
[JsonPropertyName("name")]
public string Name { get; set; } = string.Empty;
[JsonPropertyName("type")]
public string Type { get; set; } = string.Empty;
[JsonPropertyName("defaults")]
public Dictionary<string, string> Defaults { get; set; } = new Dictionary<string, string>();
}
}