Skip to content

Commit 6cb59e3

Browse files
authored
Merge pull request #16 from DevYukine/feature/performance-and-improvements
feat/perf: performance, naming and code quality improvements
2 parents 0501e71 + 5de8fe9 commit 6cb59e3

File tree

14 files changed

+542
-68
lines changed

14 files changed

+542
-68
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using Newtonsoft.Json;
4+
5+
namespace RomM.Models.RomM.Platform
6+
{
7+
public class RomMPlatform
8+
{
9+
[JsonProperty("id")]
10+
public int Id { get; set; }
11+
12+
[JsonProperty("slug")]
13+
public string Slug { get; set; }
14+
15+
[JsonProperty("fs_slug")]
16+
public string FsSlug { get; set; }
17+
18+
[JsonProperty("name")]
19+
public string Name { get; set; }
20+
21+
[JsonProperty("rom_count")]
22+
public int RomCount { get; set; }
23+
24+
[JsonProperty("igdb_id")]
25+
public ulong IgdbId { get; set; }
26+
27+
[JsonProperty("sgdb_id")]
28+
public object SgdbId { get; set; }
29+
30+
[JsonProperty("moby_id")]
31+
public object MobyId { get; set; }
32+
33+
[JsonProperty("logo_path")]
34+
public string LogoPath { get; set; }
35+
36+
[JsonProperty("firmware")]
37+
public List<RomMPlatformFirmware> Firmware { get; set; }
38+
39+
[JsonProperty("created_at")]
40+
public DateTime CreatedAt { get; set; }
41+
42+
[JsonProperty("updated_at")]
43+
public DateTime UpdatedAt { get; set; }
44+
}
45+
46+
47+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
using System;
2+
using Newtonsoft.Json;
3+
4+
namespace RomM.Models.RomM.Platform
5+
{
6+
public class RomMPlatformFirmware
7+
{
8+
[JsonProperty("id")]
9+
public int Id { get; set; }
10+
11+
[JsonProperty("file_name")]
12+
public string FileName { get; set; }
13+
14+
[JsonProperty("file_name_no_tags")]
15+
public string FileNameNoTags { get; set; }
16+
17+
[JsonProperty("file_name_no_ext")]
18+
public string FileNameNoExt { get; set; }
19+
20+
[JsonProperty("file_extension")]
21+
public string FileExtension { get; set; }
22+
23+
[JsonProperty("file_path")]
24+
public string FilePath { get; set; }
25+
26+
[JsonProperty("file_size_bytes")]
27+
public int FileSizeBytes { get; set; }
28+
29+
[JsonProperty("full_path")]
30+
public string FullPath { get; set; }
31+
32+
[JsonProperty("is_verified")]
33+
public bool IsVerified { get; set; }
34+
35+
[JsonProperty("crc_hash")]
36+
public string CrcHash { get; set; }
37+
38+
[JsonProperty("md5_hash")]
39+
public string Md5Hash { get; set; }
40+
41+
[JsonProperty("sha1_hash")]
42+
public string Sha1Hash { get; set; }
43+
44+
[JsonProperty("created_at")]
45+
public DateTime CreatedAt { get; set; }
46+
47+
[JsonProperty("updated_at")]
48+
public DateTime UpdatedAt { get; set; }
49+
}
50+
}

Models/RomM/Rom/RomMDLC.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using Newtonsoft.Json;
2+
3+
namespace RomM.Models.RomM.Rom
4+
{
5+
public class RomMDLC
6+
{
7+
[JsonProperty("id")]
8+
public int Id { get; set; }
9+
10+
[JsonProperty("name")]
11+
public string Name { get; set; }
12+
13+
[JsonProperty("slug")]
14+
public string Slug { get; set; }
15+
16+
[JsonProperty("type")]
17+
public string Type { get; set; }
18+
19+
[JsonProperty("cover_url")]
20+
public string CoverUrl { get; set; }
21+
}
22+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using Newtonsoft.Json;
2+
3+
namespace RomM.Models.RomM.Rom
4+
{
5+
public class RomMExpandedGame
6+
{
7+
[JsonProperty("id")]
8+
public int Id { get; set; }
9+
10+
[JsonProperty("name")]
11+
public string Name { get; set; }
12+
13+
[JsonProperty("slug")]
14+
public string Slug { get; set; }
15+
16+
[JsonProperty("type")]
17+
public string Type { get; set; }
18+
19+
[JsonProperty("cover_url")]
20+
public string CoverUrl { get; set; }
21+
}
22+
}

Models/RomM/Rom/RomMExpansion.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using Newtonsoft.Json;
2+
3+
namespace RomM.Models.RomM.Rom
4+
{
5+
public class RomMExpansion
6+
{
7+
[JsonProperty("id")]
8+
public int Id { get; set; }
9+
10+
[JsonProperty("name")]
11+
public string Name { get; set; }
12+
13+
[JsonProperty("slug")]
14+
public string Slug { get; set; }
15+
16+
[JsonProperty("type")]
17+
public string Type { get; set; }
18+
19+
[JsonProperty("cover_url")]
20+
public string CoverUrl { get; set; }
21+
}
22+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
using System.Collections.Generic;
2+
using Newtonsoft.Json;
3+
4+
namespace RomM.Models.RomM.Rom
5+
{
6+
public class RomMIgdbMetadata
7+
{
8+
[JsonProperty("total_rating")]
9+
public string TotalRating { get; set; }
10+
11+
[JsonProperty("aggregated_rating")]
12+
public string AggregatedRating { get; set; }
13+
14+
[JsonProperty("first_release_date")]
15+
public int? FirstReleaseDate { get; set; }
16+
17+
[JsonProperty("genres")]
18+
public List<string> Genres { get; set; }
19+
20+
[JsonProperty("franchises")]
21+
public List<string> Franchises { get; set; }
22+
23+
[JsonProperty("alternative_names")]
24+
public List<string> AlternativeNames { get; set; }
25+
26+
[JsonProperty("collections")]
27+
public List<string> Collections { get; set; }
28+
29+
[JsonProperty("companies")]
30+
public List<string> Companies { get; set; }
31+
32+
[JsonProperty("game_modes")]
33+
public List<string> GameModes { get; set; }
34+
35+
[JsonProperty("platforms")]
36+
public List<RomMRomPlatform> Platforms { get; set; }
37+
38+
[JsonProperty("expansions")]
39+
public List<RomMExpansion> Expansions { get; set; }
40+
41+
[JsonProperty("dlcs")]
42+
public List<RomMDLC> Dlcs { get; set; }
43+
44+
[JsonProperty("remasters")]
45+
public List<RomMRemaster> Remasters { get; set; }
46+
47+
[JsonProperty("remakes")]
48+
public List<RomMRemake> Remakes { get; set; }
49+
50+
[JsonProperty("expanded_games")]
51+
public List<RomMExpandedGame> ExpandedGames { get; set; }
52+
53+
[JsonProperty("ports")]
54+
public List<RomMPort> Ports { get; set; }
55+
56+
[JsonProperty("similar_games")]
57+
public List<RomMSimilarGame> SimilarGames { get; set; }
58+
}
59+
}

Models/RomM/Rom/RomMPort.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using Newtonsoft.Json;
2+
3+
namespace RomM.Models.RomM.Rom
4+
{
5+
public class RomMPort
6+
{
7+
[JsonProperty("id")]
8+
public int Id { get; set; }
9+
10+
[JsonProperty("name")]
11+
public string Name { get; set; }
12+
13+
[JsonProperty("slug")]
14+
public string Slug { get; set; }
15+
16+
[JsonProperty("type")]
17+
public string Type { get; set; }
18+
19+
[JsonProperty("cover_url")]
20+
public string CoverUrl { get; set; }
21+
}
22+
}

Models/RomM/Rom/RomMRemake.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using Newtonsoft.Json;
2+
3+
namespace RomM.Models.RomM.Rom
4+
{
5+
public class RomMRemake
6+
{
7+
[JsonProperty("id")]
8+
public int Id { get; set; }
9+
10+
[JsonProperty("name")]
11+
public string Name { get; set; }
12+
13+
[JsonProperty("slug")]
14+
public string Slug { get; set; }
15+
16+
[JsonProperty("type")]
17+
public string Type { get; set; }
18+
19+
[JsonProperty("cover_url")]
20+
public string CoverUrl { get; set; }
21+
}
22+
}

Models/RomM/Rom/RomMRemaster.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using Newtonsoft.Json;
2+
3+
namespace RomM.Models.RomM.Rom
4+
{
5+
public class RomMRemaster
6+
{
7+
[JsonProperty("id")]
8+
public int Id { get; set; }
9+
10+
[JsonProperty("name")]
11+
public string Name { get; set; }
12+
13+
[JsonProperty("slug")]
14+
public string Slug { get; set; }
15+
16+
[JsonProperty("type")]
17+
public string Type { get; set; }
18+
19+
[JsonProperty("cover_url")]
20+
public string CoverUrl { get; set; }
21+
}
22+
}

0 commit comments

Comments
 (0)