diff --git a/src/iRLeagueApiCore.Common/Enums/BonusPointType.cs b/src/iRLeagueApiCore.Common/Enums/BonusPointType.cs new file mode 100644 index 0000000..6eb185f --- /dev/null +++ b/src/iRLeagueApiCore.Common/Enums/BonusPointType.cs @@ -0,0 +1,14 @@ +public enum BonusPointType +{ + Position, + QualyPosition, + FastestLap, + FastestAverageLap, + CleanestDriver, + NoIncidents, + MostPositionsGained, + MostPositionsLost, + LeadOneLap, + LeadMostLaps, + Custom = 999, +} \ No newline at end of file diff --git a/src/iRLeagueApiCore.Common/Models/Championships/PutChampSeasonModel.cs b/src/iRLeagueApiCore.Common/Models/Championships/PutChampSeasonModel.cs index 837c00a..15ec945 100644 --- a/src/iRLeagueApiCore.Common/Models/Championships/PutChampSeasonModel.cs +++ b/src/iRLeagueApiCore.Common/Models/Championships/PutChampSeasonModel.cs @@ -13,4 +13,6 @@ public class PutChampSeasonModel : PostChampSeasonModel public ICollection ResultConfigs { get; set; } = new List(); [DataMember] public ResultConfigInfoModel? DefaultResultConfig { get; set; } + [DataMember] + public ICollection Filters { get; set; } = new List(); } \ No newline at end of file diff --git a/src/iRLeagueApiCore.Common/Models/ResultConfigurations/BonusPointModel.cs b/src/iRLeagueApiCore.Common/Models/ResultConfigurations/BonusPointModel.cs new file mode 100644 index 0000000..9784f6f --- /dev/null +++ b/src/iRLeagueApiCore.Common/Models/ResultConfigurations/BonusPointModel.cs @@ -0,0 +1,14 @@ +namespace iRLeagueApiCore.Common.Models; + +[DataContract] +public class BonusPointModel +{ + [DataMember] + public BonusPointType Type { get; set; } + [DataMember] + public double Value { get; set; } + [DataMember] + public double Points { get; set; } + [DataMember] + public ICollection Conditions { get; set; } = new List(); +} \ No newline at end of file diff --git a/src/iRLeagueApiCore.Common/Models/ResultConfigurations/PostPointRuleModel.cs b/src/iRLeagueApiCore.Common/Models/ResultConfigurations/PostPointRuleModel.cs index 70f6517..b0a9a46 100644 --- a/src/iRLeagueApiCore.Common/Models/ResultConfigurations/PostPointRuleModel.cs +++ b/src/iRLeagueApiCore.Common/Models/ResultConfigurations/PostPointRuleModel.cs @@ -8,7 +8,7 @@ public class PostPointRuleModel [DataMember] public IList PointsPerPlace { get; set; } = new List(); [DataMember] - public IDictionary BonusPoints { get; set; } = new Dictionary(); + public ICollection BonusPoints { get; set; } = new List(); [DataMember] public int MaxPoints { get; set; } public int PointDropOff { get; set; } diff --git a/src/iRLeagueApiCore.Common/Models/ResultConfigurations/ResultFilterModel.cs b/src/iRLeagueApiCore.Common/Models/ResultConfigurations/ResultFilterModel.cs index 34a4c4d..fea46be 100644 --- a/src/iRLeagueApiCore.Common/Models/ResultConfigurations/ResultFilterModel.cs +++ b/src/iRLeagueApiCore.Common/Models/ResultConfigurations/ResultFilterModel.cs @@ -8,18 +8,5 @@ public sealed class ResultFilterModel [DataMember] public long FilterOptionId { get; set; } [DataMember] - public FilterType FilterType { get; set; } - [DataMember] - public string ColumnPropertyName { get; set; } = string.Empty; - [DataMember] - public ComparatorType Comparator { get; set; } - /// - /// Action performed on values that match the conditions - /// - Keep: Keep the entries that match and remove all other entries - /// - Remove: Remove the entries that match and keep other entries - /// - [DataMember] - public MatchedValueAction Action { get; set; } - [DataMember] - public ICollection FilterValues { get; set; } = new List(); + public FilterConditionModel Condition { get; set; } = new(); } diff --git a/src/iRLeagueApiCore.Common/Models/Standings/StandingRowModel.cs b/src/iRLeagueApiCore.Common/Models/Standings/StandingRowModel.cs index bc50f74..f0f36f7 100644 --- a/src/iRLeagueApiCore.Common/Models/Standings/StandingRowModel.cs +++ b/src/iRLeagueApiCore.Common/Models/Standings/StandingRowModel.cs @@ -42,6 +42,10 @@ public class StandingRowModel [DataMember] public int RacesCounted { get; set; } [DataMember] + public int RacesScored { get; set; } + [DataMember] + public int RacesInPoints { get; set; } + [DataMember] public int DroppedResultCount { get; set; } [DataMember] public int ClubId { get; set; } diff --git a/src/iRLeagueApiCore.Common/iRLeagueApiCore.Common.csproj b/src/iRLeagueApiCore.Common/iRLeagueApiCore.Common.csproj index e448a20..eea1993 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.8.1 + 0.9.0 Simon Schulze Simon Schulze enable