Skip to content

Commit

Permalink
Merge pull request #75 from SSchulze1989/develop
Browse files Browse the repository at this point in the history
v 0.10.0
  • Loading branch information
SSchulze1989 authored Oct 29, 2023
2 parents 21c3274 + 8ca4105 commit 6bb7942
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/iRLeagueApiCore.Common/Enums/PenaltyType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ public enum PenaltyType
Points,
Position,
Time,
Disqualification,
}
4 changes: 2 additions & 2 deletions src/iRLeagueApiCore.Common/Enums/RaceStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace iRLeagueApiCore.Common.Enums;
public enum RaceStatus
{
Running,
Disconnected,
Disqualified,
Disconnected = 32,
Disqualified = 29,
Unknown
}
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 string Number { get; set; } = string.Empty;
[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 IEnumerable<MemberInfoModel> Members { get; set; } = Array.Empty<MemberInfoModel>();
[DataMember]
public TeamInfoModel? Team { get; set; }
}
6 changes: 4 additions & 2 deletions src/iRLeagueApiCore.Common/Models/Results/ResultRowModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
[DataContract]
public class ResultRowModel
{
[DataMember]
public long ScoredResultRowId { get; set; }
/// <summary>
/// First name of the driver
/// </summary>
Expand Down Expand Up @@ -45,7 +47,7 @@ public class ResultRowModel
/// Car number in the session
/// </summary>
[DataMember]
public int CarNumber { get; set; }
public string CarNumber { get; set; } = string.Empty;
/// <summary>
/// Class id in the session (in multiclass sessions)
/// </summary>
Expand Down Expand Up @@ -95,7 +97,7 @@ public class ResultRowModel
/// Driver status at the end of the race (checkered flag)
/// </summary>
[DataMember]
public int Status { get; set; }
public RaceStatus Status { get; set; }
/// <summary>
/// Time set in qualifying (only available with attached qualy)
/// </summary>
Expand Down
6 changes: 2 additions & 4 deletions src/iRLeagueApiCore.Common/Models/Reviews/PenaltyModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ public sealed class PenaltyModel : PutPenaltyModel
[DataMember]
public string SessionName { get; set; } = string.Empty;
[DataMember]
public long MemberId { get; set; }
public MemberInfoModel? Member { get; set; }
[DataMember]
public string Firstname { get; set; } = string.Empty;
[DataMember]
public string Lastname { get; set; } = string.Empty;
public TeamInfoModel? Team { get; set; }
}
2 changes: 2 additions & 0 deletions src/iRLeagueApiCore.Common/Models/Reviews/PostReviewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public class PostReviewModel
[DataMember]
public ICollection<MemberInfoModel> InvolvedMembers { get; set; } = new List<MemberInfoModel>();
[DataMember]
public ICollection<TeamInfoModel> InvolvedTeams { get; set; } = new List<TeamInfoModel>();
[DataMember]
public string ResultText { get; set; } = string.Empty;
[DataMember]
public ICollection<VoteModel> VoteResults { get; set; } = new List<VoteModel>();
Expand Down
2 changes: 2 additions & 0 deletions src/iRLeagueApiCore.Common/Models/Reviews/VoteModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ public class VoteModel
public string Description { get; set; } = string.Empty;
[DataMember]
public MemberInfoModel? MemberAtFault { get; set; }
[DataMember]
public TeamInfoModel? TeamAtFault { get; set; }
}
12 changes: 12 additions & 0 deletions src/iRLeagueApiCore.Common/Models/Teams/TeamInfoModel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace iRLeagueApiCore.Common.Models;

[DataContract]
public sealed class TeamInfoModel
{
[DataMember]
public long TeamId { get; set; }
[DataMember]
public string Name { get; set; } = string.Empty;
[DataMember]
public string TeamColor { get; set; } = string.Empty;
}
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.9.3</Version>
<Version>0.10.0</Version>
<Authors>Simon Schulze</Authors>
<Company>Simon Schulze</Company>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down

0 comments on commit 6bb7942

Please sign in to comment.