From ecc26cbb7554026c20cb37188577db49ed366894 Mon Sep 17 00:00:00 2001 From: Simon Schulze Date: Sat, 28 Oct 2023 02:32:33 +0200 Subject: [PATCH 1/2] Use RaceStatus enum for Status on result rows --- src/iRLeagueApiCore.Common/Enums/RaceStatus.cs | 4 ++-- src/iRLeagueApiCore.Common/Models/Results/ResultRowModel.cs | 2 +- src/iRLeagueApiCore.Common/iRLeagueApiCore.Common.csproj | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/iRLeagueApiCore.Common/Enums/RaceStatus.cs b/src/iRLeagueApiCore.Common/Enums/RaceStatus.cs index b941bec..3b9cfca 100644 --- a/src/iRLeagueApiCore.Common/Enums/RaceStatus.cs +++ b/src/iRLeagueApiCore.Common/Enums/RaceStatus.cs @@ -25,7 +25,7 @@ namespace iRLeagueApiCore.Common.Enums; public enum RaceStatus { Running, - Disconnected, - Disqualified, + Disconnected = 32, + Disqualified = 29, Unknown } diff --git a/src/iRLeagueApiCore.Common/Models/Results/ResultRowModel.cs b/src/iRLeagueApiCore.Common/Models/Results/ResultRowModel.cs index a05f3ed..ce4cd5d 100644 --- a/src/iRLeagueApiCore.Common/Models/Results/ResultRowModel.cs +++ b/src/iRLeagueApiCore.Common/Models/Results/ResultRowModel.cs @@ -97,7 +97,7 @@ public class ResultRowModel /// Driver status at the end of the race (checkered flag) /// [DataMember] - public int Status { get; set; } + public RaceStatus Status { get; set; } /// /// Time set in qualifying (only available with attached qualy) /// diff --git a/src/iRLeagueApiCore.Common/iRLeagueApiCore.Common.csproj b/src/iRLeagueApiCore.Common/iRLeagueApiCore.Common.csproj index aed1074..d87061d 100644 --- a/src/iRLeagueApiCore.Common/iRLeagueApiCore.Common.csproj +++ b/src/iRLeagueApiCore.Common/iRLeagueApiCore.Common.csproj @@ -18,7 +18,7 @@ Library net6.0 iRLeagueApiCore.Common - 0.10.0-dev.8 + 0.10.0-dev.9 Simon Schulze Simon Schulze enable From e74a51fddfd55edaadb0a83c63ed76215a2c43ed Mon Sep 17 00:00:00 2001 From: Simon Schulze Date: Sun, 29 Oct 2023 00:46:25 +0200 Subject: [PATCH 2/2] Add disqualification penalty type --- src/iRLeagueApiCore.Common/Enums/PenaltyType.cs | 1 + src/iRLeagueApiCore.Common/iRLeagueApiCore.Common.csproj | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/iRLeagueApiCore.Common/Enums/PenaltyType.cs b/src/iRLeagueApiCore.Common/Enums/PenaltyType.cs index a4e28d0..b0903da 100644 --- a/src/iRLeagueApiCore.Common/Enums/PenaltyType.cs +++ b/src/iRLeagueApiCore.Common/Enums/PenaltyType.cs @@ -4,4 +4,5 @@ public enum PenaltyType Points, Position, Time, + Disqualification, } diff --git a/src/iRLeagueApiCore.Common/iRLeagueApiCore.Common.csproj b/src/iRLeagueApiCore.Common/iRLeagueApiCore.Common.csproj index d87061d..2db7b5f 100644 --- a/src/iRLeagueApiCore.Common/iRLeagueApiCore.Common.csproj +++ b/src/iRLeagueApiCore.Common/iRLeagueApiCore.Common.csproj @@ -18,7 +18,7 @@ Library net6.0 iRLeagueApiCore.Common - 0.10.0-dev.9 + 0.10.0-dev.10 Simon Schulze Simon Schulze enable