Skip to content

Commit

Permalink
Merge pull request #16 from DevYukine/feature/performance-and-improve…
Browse files Browse the repository at this point in the history
…ments

feat/perf: performance, naming and code quality improvements
  • Loading branch information
gantoine authored Aug 2, 2024
2 parents 0501e71 + 5de8fe9 commit 6cb59e3
Show file tree
Hide file tree
Showing 14 changed files with 542 additions and 68 deletions.
47 changes: 47 additions & 0 deletions Models/RomM/Platform/RomMPlatform.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using Newtonsoft.Json;

namespace RomM.Models.RomM.Platform
{
public class RomMPlatform
{
[JsonProperty("id")]
public int Id { get; set; }

[JsonProperty("slug")]
public string Slug { get; set; }

[JsonProperty("fs_slug")]
public string FsSlug { get; set; }

[JsonProperty("name")]
public string Name { get; set; }

[JsonProperty("rom_count")]
public int RomCount { get; set; }

[JsonProperty("igdb_id")]
public ulong IgdbId { get; set; }

[JsonProperty("sgdb_id")]
public object SgdbId { get; set; }

[JsonProperty("moby_id")]
public object MobyId { get; set; }

[JsonProperty("logo_path")]
public string LogoPath { get; set; }

[JsonProperty("firmware")]
public List<RomMPlatformFirmware> Firmware { get; set; }

[JsonProperty("created_at")]
public DateTime CreatedAt { get; set; }

[JsonProperty("updated_at")]
public DateTime UpdatedAt { get; set; }
}


}
50 changes: 50 additions & 0 deletions Models/RomM/Platform/RomMPlatformFirmware.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
using System;
using Newtonsoft.Json;

namespace RomM.Models.RomM.Platform
{
public class RomMPlatformFirmware
{
[JsonProperty("id")]
public int Id { get; set; }

[JsonProperty("file_name")]
public string FileName { get; set; }

[JsonProperty("file_name_no_tags")]
public string FileNameNoTags { get; set; }

[JsonProperty("file_name_no_ext")]
public string FileNameNoExt { get; set; }

[JsonProperty("file_extension")]
public string FileExtension { get; set; }

[JsonProperty("file_path")]
public string FilePath { get; set; }

[JsonProperty("file_size_bytes")]
public int FileSizeBytes { get; set; }

[JsonProperty("full_path")]
public string FullPath { get; set; }

[JsonProperty("is_verified")]
public bool IsVerified { get; set; }

[JsonProperty("crc_hash")]
public string CrcHash { get; set; }

[JsonProperty("md5_hash")]
public string Md5Hash { get; set; }

[JsonProperty("sha1_hash")]
public string Sha1Hash { get; set; }

[JsonProperty("created_at")]
public DateTime CreatedAt { get; set; }

[JsonProperty("updated_at")]
public DateTime UpdatedAt { get; set; }
}
}
22 changes: 22 additions & 0 deletions Models/RomM/Rom/RomMDLC.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Newtonsoft.Json;

namespace RomM.Models.RomM.Rom
{
public class RomMDLC
{
[JsonProperty("id")]
public int Id { get; set; }

[JsonProperty("name")]
public string Name { get; set; }

[JsonProperty("slug")]
public string Slug { get; set; }

[JsonProperty("type")]
public string Type { get; set; }

[JsonProperty("cover_url")]
public string CoverUrl { get; set; }
}
}
22 changes: 22 additions & 0 deletions Models/RomM/Rom/RomMExpandedGame.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Newtonsoft.Json;

namespace RomM.Models.RomM.Rom
{
public class RomMExpandedGame
{
[JsonProperty("id")]
public int Id { get; set; }

[JsonProperty("name")]
public string Name { get; set; }

[JsonProperty("slug")]
public string Slug { get; set; }

[JsonProperty("type")]
public string Type { get; set; }

[JsonProperty("cover_url")]
public string CoverUrl { get; set; }
}
}
22 changes: 22 additions & 0 deletions Models/RomM/Rom/RomMExpansion.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Newtonsoft.Json;

namespace RomM.Models.RomM.Rom
{
public class RomMExpansion
{
[JsonProperty("id")]
public int Id { get; set; }

[JsonProperty("name")]
public string Name { get; set; }

[JsonProperty("slug")]
public string Slug { get; set; }

[JsonProperty("type")]
public string Type { get; set; }

[JsonProperty("cover_url")]
public string CoverUrl { get; set; }
}
}
59 changes: 59 additions & 0 deletions Models/RomM/Rom/RomMIgdbMetadata.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
using System.Collections.Generic;
using Newtonsoft.Json;

namespace RomM.Models.RomM.Rom
{
public class RomMIgdbMetadata
{
[JsonProperty("total_rating")]
public string TotalRating { get; set; }

[JsonProperty("aggregated_rating")]
public string AggregatedRating { get; set; }

[JsonProperty("first_release_date")]
public int? FirstReleaseDate { get; set; }

[JsonProperty("genres")]
public List<string> Genres { get; set; }

[JsonProperty("franchises")]
public List<string> Franchises { get; set; }

[JsonProperty("alternative_names")]
public List<string> AlternativeNames { get; set; }

[JsonProperty("collections")]
public List<string> Collections { get; set; }

[JsonProperty("companies")]
public List<string> Companies { get; set; }

[JsonProperty("game_modes")]
public List<string> GameModes { get; set; }

[JsonProperty("platforms")]
public List<RomMRomPlatform> Platforms { get; set; }

[JsonProperty("expansions")]
public List<RomMExpansion> Expansions { get; set; }

[JsonProperty("dlcs")]
public List<RomMDLC> Dlcs { get; set; }

[JsonProperty("remasters")]
public List<RomMRemaster> Remasters { get; set; }

[JsonProperty("remakes")]
public List<RomMRemake> Remakes { get; set; }

[JsonProperty("expanded_games")]
public List<RomMExpandedGame> ExpandedGames { get; set; }

[JsonProperty("ports")]
public List<RomMPort> Ports { get; set; }

[JsonProperty("similar_games")]
public List<RomMSimilarGame> SimilarGames { get; set; }
}
}
22 changes: 22 additions & 0 deletions Models/RomM/Rom/RomMPort.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Newtonsoft.Json;

namespace RomM.Models.RomM.Rom
{
public class RomMPort
{
[JsonProperty("id")]
public int Id { get; set; }

[JsonProperty("name")]
public string Name { get; set; }

[JsonProperty("slug")]
public string Slug { get; set; }

[JsonProperty("type")]
public string Type { get; set; }

[JsonProperty("cover_url")]
public string CoverUrl { get; set; }
}
}
22 changes: 22 additions & 0 deletions Models/RomM/Rom/RomMRemake.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Newtonsoft.Json;

namespace RomM.Models.RomM.Rom
{
public class RomMRemake
{
[JsonProperty("id")]
public int Id { get; set; }

[JsonProperty("name")]
public string Name { get; set; }

[JsonProperty("slug")]
public string Slug { get; set; }

[JsonProperty("type")]
public string Type { get; set; }

[JsonProperty("cover_url")]
public string CoverUrl { get; set; }
}
}
22 changes: 22 additions & 0 deletions Models/RomM/Rom/RomMRemaster.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Newtonsoft.Json;

namespace RomM.Models.RomM.Rom
{
public class RomMRemaster
{
[JsonProperty("id")]
public int Id { get; set; }

[JsonProperty("name")]
public string Name { get; set; }

[JsonProperty("slug")]
public string Slug { get; set; }

[JsonProperty("type")]
public string Type { get; set; }

[JsonProperty("cover_url")]
public string CoverUrl { get; set; }
}
}
Loading

0 comments on commit 6cb59e3

Please sign in to comment.