Skip to content

Commit

Permalink
Merge pull request #53 from SSchulze1989/develop
Browse files Browse the repository at this point in the history
v 0.7.2
  • Loading branch information
SSchulze1989 authored Jul 23, 2023
2 parents f259e53 + 0198b93 commit 44455b8
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/iRLeagueApiCore.Common/Enums/ComparatorType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ public enum ComparatorType
IsBiggerOrEqual,
IsBigger,
NotEqual,
InList
InList,
ForEach, // special comparator that multiplies the configured bonus/penalty for each multiple of the provided value
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
namespace iRLeagueApiCore.Common.Models;

[DataContract]
public sealed class AutoPenaltyConfiguration
{
[DataMember]
public long LeagueId { get; set; }
[DataMember]
public long PenaltyConfigId { get; set; }
[DataMember]
public string Description { get; set; } = string.Empty;
[DataMember]
public PenaltyType Type { get; set; }
[DataMember(EmitDefaultValue = false)]
public int Points { get; set; }
[DataMember(EmitDefaultValue = false)]
public TimeSpan Time { get; set; }
[DataMember(EmitDefaultValue = false)]
public int Positions { get; set; }
[DataMember]
public ICollection<FilterConditionModel> Conditions { get; set; } = new List<FilterConditionModel>();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
namespace iRLeagueApiCore.Common.Models;

[DataContract]
public sealed class FilterConditionModel
{
[DataMember]
public FilterType FilterType { get; set; }
[DataMember]
public string ColumnPropertyName { get; set; } = string.Empty;
[DataMember]
public ComparatorType Comparator { get; set; }
[DataMember]
public ICollection<string> FilterValues { get; set; } = new List<string>();
[DataMember]
public MatchedValueAction Action { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,9 @@ public class PostPointRuleModel
public int PointDropOff { get; set; }
public ICollection<SortOptions> PointsSortOptions { get; set; } = new List<SortOptions>();
public ICollection<SortOptions> FinalSortOptions { get; set; } = new List<SortOptions>();
/// <summary>
/// List of configurations for automated penalties
/// </summary>
[DataMember]
public ICollection<AutoPenaltyConfiguration> AutoPenalties { get; set; } = new List<AutoPenaltyConfiguration>();
}
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.7.1</Version>
<Version>0.7.2</Version>
<Authors>Simon Schulze</Authors>
<Company>Simon Schulze</Company>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down

0 comments on commit 44455b8

Please sign in to comment.