Add project files.
This commit is contained in:
51
ModVersionChecker/data/model/AppConfig.cs
Normal file
51
ModVersionChecker/data/model/AppConfig.cs
Normal 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;
|
||||
|
||||
}
|
15
ModVersionChecker/data/model/AppStatus.cs
Normal file
15
ModVersionChecker/data/model/AppStatus.cs
Normal 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,
|
||||
}
|
||||
}
|
18
ModVersionChecker/data/model/CheckerTypeDef.cs
Normal file
18
ModVersionChecker/data/model/CheckerTypeDef.cs
Normal 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>();
|
||||
}
|
||||
}
|
27
ModVersionChecker/data/model/FieldDef.cs
Normal file
27
ModVersionChecker/data/model/FieldDef.cs
Normal 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;
|
||||
}
|
||||
}
|
36
ModVersionChecker/data/model/FsModPathConfig.cs
Normal file
36
ModVersionChecker/data/model/FsModPathConfig.cs
Normal 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>();
|
||||
}
|
||||
}
|
21
ModVersionChecker/data/model/GlobalConfig.cs
Normal file
21
ModVersionChecker/data/model/GlobalConfig.cs
Normal 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;
|
||||
}
|
||||
}
|
24
ModVersionChecker/data/model/SourceDef.cs
Normal file
24
ModVersionChecker/data/model/SourceDef.cs
Normal 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>();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user