Skip to content

Commit

Permalink
Building out models
Browse files Browse the repository at this point in the history
  • Loading branch information
kamranayub committed May 19, 2019
1 parent 5532ad7 commit e1d812a
Show file tree
Hide file tree
Showing 26 changed files with 278 additions and 40 deletions.
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"editor.detectIndentation": false,
"editor.tabSize": 2
}
20 changes: 20 additions & 0 deletions IGDB/Models/Collection.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using Newtonsoft.Json;

namespace IGDB
{
public class Collection : ITimestamps
{
public DateTimeOffset? CreatedAt { get; set; }

public IdentitiesOrValues<Game> Games { get; set; }

public string Name { get; set; }

public string Slug { get; set; }

public DateTimeOffset? UpdatedAt { get; set; }

public string Url { get; set; }
}
}
45 changes: 45 additions & 0 deletions IGDB/Models/Company.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using System;

namespace IGDB
{
public class Company : ITimestamps
{
public DateTimeOffset? ChangeDate { get; set; }
public ChangeDateCategory ChangeDateCategory { get; set; }
public IdentityOrValue<Company> ChangedCompanyId { get; set; }

/// <summary>
/// ISO 3166-1 country code
/// </summary>
public int? Country { get; set; }

public DateTimeOffset? CreatedAt { get; set; }

public string Description { get; set; }

public IdentitiesOrValues<Game> Developed { get; set; }

public IdentityOrValue<CompanyLogo> Logo { get; set; }

public string Name { get; set; }
public IdentityOrValue<Company> Parent { get; set; }
public IdentitiesOrValues<Game> Published { get; set; }
public string Slug { get; set; }
public DateTimeOffset? StartDate { get; set; }
public StartDateCategory StartDateCategory { get; set; }
public DateTimeOffset? UpdatedAt { get; set; }
public string Url { get; set; }
public IdentitiesOrValues<CompanyWebsite> Websites { get; set; }

}

public enum ChangeDateCategory
{

}

public enum StartDateCategory
{

}
}
6 changes: 6 additions & 0 deletions IGDB/Models/CompanyLogo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace IGDB
{
public class CompanyLogo
{
}
}
6 changes: 6 additions & 0 deletions IGDB/Models/CompanyWebsite.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace IGDB
{
public class CompanyWebsite
{
}
}
34 changes: 34 additions & 0 deletions IGDB/Models/ExternalGame.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using System;

namespace IGDB
{
public class ExternalGame : ITimestamps
{
public ExternalCategory? Category { get; set; }

public DateTimeOffset? CreatedAt { get; set; }

public IdentityOrValue<Game> Game { get; set; }

public string Name { get; set; }

public string Uid { get; set; }

public DateTimeOffset? UpdatedAt { get; set; }

public string Url { get; set; }

public int? Year { get; set; }
}

public enum ExternalCategory
{
Steam = 1,
GOG = 5,
YouTube = 10,
Microsoft = 11,
Apple = 13,
Twitch = 14,
Android = 15
}
}
14 changes: 14 additions & 0 deletions IGDB/Models/Franchise.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;

namespace IGDB
{
public class Franchise : ITimestamps
{
public DateTimeOffset? CreatedAt { get; set; }
public DateTimeOffset? UpdatedAt { get; set; }
public IdentitiesOrValues<Game> Games { get; set; }
public string Name { get; set; }
public string Slug { get; set; }
public string Url { get; set; }
}
}
46 changes: 23 additions & 23 deletions IGDB/Models/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace IGDB
{
public class Game
public class Game : ITimestamps
{
public int? AgeRatings { get; set; }

Expand All @@ -19,49 +19,49 @@ public class Game

public Category? Category { get; set; }

public IdentityOrValue<Series> Collection { get; set; }
public IdentityOrValue<Collection> Collection { get; set; }

public IdentityOrValue<Cover> Cover { get; set; }

public DateTimeOffset? CreatedAt { get; set; }

public IdentitiesOrValues<Game> Dlcs { get; set; }

public IdentitiesOrValues<Game> Expansions { get; set; }

public int[] ExternalGames { get; set; }
public IdentitiesOrValues<ExternalGame> ExternalGames { get; set; }

public DateTimeOffset? FirstReleaseDate { get; set; }

public int? Follows { get; set; }

public int? Franchise { get; set; }
public IdentityOrValue<Franchise> Franchise { get; set; }

public int[] Franchises { get; set; }
public IdentitiesOrValues<Franchise> Franchises { get; set; }

public int[] GameEngines { get; set; }
public IdentitiesOrValues<GameEngine> GameEngines { get; set; }

public int[] GameModes { get; set; }
public IdentitiesOrValues<GameMode> GameModes { get; set; }

public IdentitiesOrValues<Genre> Genres { get; set; }

public int? Hypes { get; set; }

public int? Id { get; set; }

public int[] InvolvedCompanies { get; set; }
public IdentitiesOrValues<InvolvedCompany> InvolvedCompanies { get; set; }

public int[] Keywords { get; set; }
public IdentitiesOrValues<Keyword> Keywords { get; set; }

public int[] MultiplayerModes { get; set; }
public IdentitiesOrValues<MultiplayerMode> MultiplayerModes { get; set; }

public string Name { get; set; }

public int? ParentGame { get; set; }
public IdentityOrValue<Game> ParentGame { get; set; }

public int[] Platforms { get; set; }
public IdentitiesOrValues<Platform> Platforms { get; set; }

public int[] PlayerPerspectives { get; set; }
public IdentitiesOrValues<PlayerPerspective> PlayerPerspectives { get; set; }

public double? Popularity { get; set; }

Expand All @@ -71,27 +71,27 @@ public class Game

public int? RatingCount { get; set; }

public int[] ReleaseDates { get; set; }
public IdentitiesOrValues<ReleaseDate> ReleaseDates { get; set; }

public int[] Screenshots { get; set; }
public IdentitiesOrValues<Screenshot> Screenshots { get; set; }

public IdentitiesOrValues<Game> SimilarGames { get; set; }

public string Slug { get; set; }

public int[] StandaloneExpansions { get; set; }
public IdentitiesOrValues<Game> StandaloneExpansions { get; set; }

public GameStatus Status { get; set; }

public string Storyline { get; set; }

public string Summary { get; set; }

public int[] Tags { get; set; }
public IdentitiesOrValues<Tag> Tags { get; set; }

public int[] Themes { get; set; }
public IdentitiesOrValues<Theme> Themes { get; set; }

public int? TimeToBeat { get; set; }
public IdentityOrValue<TimeToBeat> TimeToBeat { get; set; }

public double? TotalRating { get; set; }

Expand All @@ -101,13 +101,13 @@ public class Game

public string Url { get; set; }

public int? VersionParent { get; set; }
public IdentityOrValue<Game> VersionParent { get; set; }

public string VersionTitle { get; set; }

public int[] Videos { get; set; }
public IdentitiesOrValues<GameVideo> Videos { get; set; }

public int[] Websites { get; set; }
public IdentitiesOrValues<Website> Websites { get; set; }
}

public enum Category
Expand Down
23 changes: 23 additions & 0 deletions IGDB/Models/GameEngine.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;

namespace IGDB
{
public class GameEngine : ITimestamps
{
public IdentitiesOrValues<Company> Companies { get; set; }

public DateTimeOffset? CreatedAt { get; set; }

public string Description { get; set; }
public IdentityOrValue<GameEngineLogo> Logo { get; set; }

public string Name { get; set; }

public IdentitiesOrValues<Platform> Platforms { get; set; }

public string Slug { get; set; }

public DateTimeOffset? UpdatedAt { get; set; }
public string Url { get; set; }
}
}
6 changes: 6 additions & 0 deletions IGDB/Models/GameEngineLogo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace IGDB
{
public class GameEngineLogo
{
}
}
14 changes: 14 additions & 0 deletions IGDB/Models/GameMode.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;

namespace IGDB
{
public class GameMode : ITimestamps
{
public DateTimeOffset? CreatedAt { get; set; }

public string Name { get; set; }
public string Slug { get; set; }
public DateTimeOffset? UpdatedAt { get; set; }
public string Url { get; set; }
}
}
6 changes: 6 additions & 0 deletions IGDB/Models/GameVideo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace IGDB
{
public class GameVideo
{
}
}
2 changes: 1 addition & 1 deletion IGDB/Models/Genre.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace IGDB
{
public class Genre
public class Genre : ITimestamps
{
public DateTimeOffset? CreatedAt { get; set; }

Expand Down
10 changes: 10 additions & 0 deletions IGDB/Models/ITimestamps.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System;

namespace IGDB
{
public interface ITimestamps
{
DateTimeOffset? CreatedAt { get; set; }
DateTimeOffset? UpdatedAt { get; set; }
}
}
6 changes: 6 additions & 0 deletions IGDB/Models/InvolvedCompany.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace IGDB
{
public class InvolvedCompany
{
}
}
6 changes: 6 additions & 0 deletions IGDB/Models/Keyword.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace IGDB
{
public class Keyword
{
}
}
6 changes: 6 additions & 0 deletions IGDB/Models/MultiplayerMode.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace IGDB
{
public class MultiplayerMode
{
}
}
6 changes: 6 additions & 0 deletions IGDB/Models/Platform.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace IGDB
{
public class Platform
{
}
}
6 changes: 6 additions & 0 deletions IGDB/Models/PlayerPerspective.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace IGDB
{
public class PlayerPerspective
{
}
}
6 changes: 6 additions & 0 deletions IGDB/Models/ReleaseDate.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace IGDB
{
public class ReleaseDate
{
}
}
6 changes: 6 additions & 0 deletions IGDB/Models/Screenshot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace IGDB
{
public class Screenshot
{
}
}
Loading

0 comments on commit e1d812a

Please sign in to comment.