Skip to content

Commit

Permalink
Add info model for cars in event
Browse files Browse the repository at this point in the history
  • Loading branch information
SSchulze1989 committed Oct 23, 2023
1 parent b8cd628 commit a2c7389
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/iRLeagueApiCore.Common/Models/Results/CarListModel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace iRLeagueApiCore.Common.Models.Results;

[DataContract]
public sealed class CarListModel
{
[DataMember]
public bool IsTeamEvent { get; set; }
[DataMember]
public IEnumerable<EventCarInfoModel> Cars { get; set; } = Array.Empty<EventCarInfoModel>();
}
23 changes: 23 additions & 0 deletions src/iRLeagueApiCore.Common/Models/Results/EventCarInfoModel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
namespace iRLeagueApiCore.Common.Models.Results;

/// <summary>
/// Contains information about a specific car in an event and it's driver(s) or team
/// </summary>
[DataContract]
public sealed class EventCarInfoModel
{
[DataMember]
public int Number { get; set; }
[DataMember]
public string Car { get; set; } = string.Empty;
[DataMember]
public int CarId { get; set; }
[DataMember]
public int ClassId { get;}
[DataMember]
public string Class { get; set; } = string.Empty;
[DataMember]
public MemberInfoModel? Member { get; set; }
[DataMember]
public TeamInfoModel? Team { get; set; }
}
2 changes: 1 addition & 1 deletion src/iRLeagueApiCore.Common/iRLeagueApiCore.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<OutputType>Library</OutputType>
<TargetFramework>net6.0</TargetFramework>
<PackageId>iRLeagueApiCore.Common</PackageId>
<Version>0.10.0-dev.4</Version>
<Version>0.10.0-dev.5</Version>
<Authors>Simon Schulze</Authors>
<Company>Simon Schulze</Company>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down

0 comments on commit a2c7389

Please sign in to comment.