From aa25d4333eccc16cbbda1d7311fc8bdacd929176 Mon Sep 17 00:00:00 2001 From: Simon Schulze Date: Sat, 24 Feb 2024 00:26:14 +0100 Subject: [PATCH] Add point rule formula type --- src/iRLeagueApiCore.Common/Enums/PointRuleType.cs | 7 +++++++ .../Models/ResultConfigurations/PostPointRuleModel.cs | 4 ++++ src/iRLeagueApiCore.Common/iRLeagueApiCore.Common.csproj | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 src/iRLeagueApiCore.Common/Enums/PointRuleType.cs diff --git a/src/iRLeagueApiCore.Common/Enums/PointRuleType.cs b/src/iRLeagueApiCore.Common/Enums/PointRuleType.cs new file mode 100644 index 0000000..b32fb1e --- /dev/null +++ b/src/iRLeagueApiCore.Common/Enums/PointRuleType.cs @@ -0,0 +1,7 @@ +namespace iRLeagueApiCore.Common.Enums; +public enum PointRuleType +{ + PointList, + MaxPointsDropOff, + Formula, +}; diff --git a/src/iRLeagueApiCore.Common/Models/ResultConfigurations/PostPointRuleModel.cs b/src/iRLeagueApiCore.Common/Models/ResultConfigurations/PostPointRuleModel.cs index b0a9a46..5d3e6b9 100644 --- a/src/iRLeagueApiCore.Common/Models/ResultConfigurations/PostPointRuleModel.cs +++ b/src/iRLeagueApiCore.Common/Models/ResultConfigurations/PostPointRuleModel.cs @@ -6,10 +6,14 @@ public class PostPointRuleModel [DataMember] public string Name { get; set; } = string.Empty; [DataMember] + public PointRuleType RuleType { get; set; } + [DataMember] public IList PointsPerPlace { get; set; } = new List(); [DataMember] public ICollection BonusPoints { get; set; } = new List(); [DataMember] + public string Formula { get; set; } = string.Empty; + [DataMember] public int MaxPoints { get; set; } public int PointDropOff { get; set; } public ICollection PointsSortOptions { get; set; } = new List(); diff --git a/src/iRLeagueApiCore.Common/iRLeagueApiCore.Common.csproj b/src/iRLeagueApiCore.Common/iRLeagueApiCore.Common.csproj index d6b99f4..2ed1549 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.11.0 + 0.11.1-dev.1 Simon Schulze Simon Schulze enable