@ -70,8 +70,7 @@ final class Tournament : ModelObject, Storable {
var minimumPlayerPerTeam : Int = 2
var maximumPlayerPerTeam : Int = 2
var information : String ? = nil
var displayEntryFeeInformation : Bool = false
@ ObservationIgnored
var navigationPath : [ Screen ] = [ ]
@ -122,16 +121,20 @@ final class Tournament : ModelObject, Storable {
case _loserBracketMode = " loserBracketMode "
case _initialSeedRound = " initialSeedRound "
case _initialSeedCount = " initialSeedCount "
case _accountIsRequired = " account_is_required "
case _licenseIsRequired = " license_is_required "
case _minimumPlayerPerTeam = " minimum_player_per_team "
case _maximumPlayerPerTeam = " maximum_player_per_team "
case _enableOnlineRegistration = " enableOnlineRegistration "
case _registrationDateLimit = " registrationDateLimit "
case _openingRegistrationDate = " openingRegistrationDate "
case _targetTeamCount = " targetTeamCount "
case _waitingListLimit = " waitingListLimit "
case _accountIsRequired = " accountIsRequired "
case _licenseIsRequired = " licenseIsRequired "
case _minimumPlayerPerTeam = " minimumPlayerPerTeam "
case _maximumPlayerPerTeam = " maximumPlayerPerTeam "
case _information = " information "
case _displayEntryFeeInformation = " displayEntryFeeInformation "
}
internal init ( event : String ? = nil , name : String ? = nil , startDate : Date = Date ( ) , endDate : Date ? = nil , creationDate : Date = Date ( ) , isPrivate : Bool = false , groupStageFormat : MatchFormat ? = nil , roundFormat : MatchFormat ? = nil , loserRoundFormat : MatchFormat ? = nil , groupStageSortMode : GroupStageOrderingMode , groupStageCount : Int = 4 , rankSourceDate : Date ? = nil , dayDuration : Int = 1 , teamCount : Int = 24 , teamSorting : TeamSortingType ? = nil , federalCategory : TournamentCategory , federalLevelCategory : TournamentLevel , federalAgeCategory : FederalTournamentAge , closedRegistrationDate : Date ? = nil , groupStageAdditionalQualified : Int = 0 , courtCount : Int = 2 , prioritizeClubMembers : Bool = false , qualifiedPerGroupStage : Int = 1 , teamsPerGroupStage : Int = 4 , entryFee : Double ? = nil , additionalEstimationDuration : Int = 0 , isDeleted : Bool = false , publishTeams : Bool = false , publishSummons : Bool = false , publishGroupStages : Bool = false , publishBrackets : Bool = false , shouldVerifyBracket : Bool = false , shouldVerifyGroupStage : Bool = false , hideTeamsWeight : Bool = false , publishTournament : Bool = false , hidePointsEarned : Bool = false , publishRankings : Bool = false , loserBracketMode : LoserBracketMode = . automatic , initialSeedRound : Int = 0 , initialSeedCount : Int = 0 , accountIsRequired : Bool = true , licenseIsRequired : Bool = true , minimumPlayerPerTeam : Int = 2 , maximumPlayerPerTeam : Int = 2 , information : String ? = nil , displayEntryFeeInformation : Bool = false ) {
internal init ( event : String ? = nil , name : String ? = nil , startDate : Date = Date ( ) , endDate : Date ? = nil , creationDate : Date = Date ( ) , isPrivate : Bool = false , groupStageFormat : MatchFormat ? = nil , roundFormat : MatchFormat ? = nil , loserRoundFormat : MatchFormat ? = nil , groupStageSortMode : GroupStageOrderingMode , groupStageCount : Int = 4 , rankSourceDate : Date ? = nil , dayDuration : Int = 1 , teamCount : Int = 24 , teamSorting : TeamSortingType ? = nil , federalCategory : TournamentCategory , federalLevelCategory : TournamentLevel , federalAgeCategory : FederalTournamentAge , closedRegistrationDate : Date ? = nil , groupStageAdditionalQualified : Int = 0 , courtCount : Int = 2 , prioritizeClubMembers : Bool = false , qualifiedPerGroupStage : Int = 1 , teamsPerGroupStage : Int = 4 , entryFee : Double ? = nil , additionalEstimationDuration : Int = 0 , isDeleted : Bool = false , publishTeams : Bool = false , publishSummons : Bool = false , publishGroupStages : Bool = false , publishBrackets : Bool = false , shouldVerifyBracket : Bool = false , shouldVerifyGroupStage : Bool = false , hideTeamsWeight : Bool = false , publishTournament : Bool = false , hidePointsEarned : Bool = false , publishRankings : Bool = false , loserBracketMode : LoserBracketMode = . automatic , initialSeedRound : Int = 0 , initialSeedCount : Int = 0 , enableOnlineRegistration : Bool = false , registrationDateLimit : Date ? = nil , openingRegistrationDate : Date ? = nil , targetTeamCount : Int ? = nil , waitingListLimit : Int ? = nil , accountIsRequired : Bool = true , licenseIsRequired : Bool = true , minimumPlayerPerTeam : Int = 2 , maximumPlayerPerTeam : Int = 2 , information : String ? = nil ) {
self . event = event
self . name = name
self . startDate = startDate
@ -185,14 +188,17 @@ final class Tournament : ModelObject, Storable {
self . loserBracketMode = loserBracketMode
self . initialSeedRound = initialSeedRound
self . initialSeedCount = initialSeedCount
self . enableOnlineRegistration = enableOnlineRegistration
self . registrationDateLimit = registrationDateLimit
self . openingRegistrationDate = openingRegistrationDate
self . targetTeamCount = targetTeamCount
self . waitingListLimit = waitingListLimit
self . accountIsRequired = accountIsRequired
self . licenseIsRequired = licenseIsRequired
self . minimumPlayerPerTeam = minimumPlayerPerTeam
self . maximumPlayerPerTeam = maximumPlayerPerTeam
self . information = information
self . displayEntryFeeInformation = displayEntryFeeInformation
}
required init ( from decoder : Decoder ) throws {
@ -240,15 +246,17 @@ final class Tournament : ModelObject, Storable {
loserBracketMode = try container . decodeIfPresent ( LoserBracketMode . self , forKey : . _loserBracketMode ) ? ? . automatic
initialSeedRound = try container . decodeIfPresent ( Int . self , forKey : . _initialSeedRound ) ? ? 0
initialSeedCount = try container . decodeIfPresent ( Int . self , forKey : . _initialSeedCount ) ? ? 0
enableOnlineRegistration = try container . decodeIfPresent ( Bool . self , forKey : . _enableOnlineRegistration ) ? ? false
registrationDateLimit = try container . decodeIfPresent ( Date . self , forKey : . _registrationDateLimit )
openingRegistrationDate = try container . decodeIfPresent ( Date . self , forKey : . _openingRegistrationDate )
targetTeamCount = try container . decodeIfPresent ( Int . self , forKey : . _targetTeamCount )
waitingListLimit = try container . decodeIfPresent ( Int . self , forKey : . _waitingListLimit )
accountIsRequired = try container . decodeIfPresent ( Bool . self , forKey : . _accountIsRequired ) ? ? true
licenseIsRequired = try container . decodeIfPresent ( Bool . self , forKey : . _licenseIsRequired ) ? ? true
minimumPlayerPerTeam = try container . decodeIfPresent ( Int . self , forKey : . _minimumPlayerPerTeam ) ? ? 2
maximumPlayerPerTeam = try container . decodeIfPresent ( Int . self , forKey : . _maximumPlayerPerTeam ) ? ? 2
information = try container . decodeIfPresent ( String . self , forKey : . _information )
displayEntryFeeInformation = try container . decodeIfPresent ( Bool . self , forKey : . _displayEntryFeeInformation ) ? ? false
}
fileprivate static let _numberFormatter : NumberFormatter = NumberFormatter ( )
@ -337,12 +345,17 @@ final class Tournament : ModelObject, Storable {
try container . encode ( loserBracketMode , forKey : . _loserBracketMode )
try container . encode ( initialSeedRound , forKey : . _initialSeedRound )
try container . encode ( initialSeedCount , forKey : . _initialSeedCount )
try container . encode ( enableOnlineRegistration , forKey : . _enableOnlineRegistration )
try container . encodeIfPresent ( registrationDateLimit , forKey : . _registrationDateLimit )
try container . encodeIfPresent ( openingRegistrationDate , forKey : . _openingRegistrationDate )
try container . encodeIfPresent ( targetTeamCount , forKey : . _targetTeamCount )
try container . encodeIfPresent ( waitingListLimit , forKey : . _waitingListLimit )
try container . encode ( accountIsRequired , forKey : . _accountIsRequired )
try container . encode ( licenseIsRequired , forKey : . _licenseIsRequired )
try container . encode ( minimumPlayerPerTeam , forKey : . _minimumPlayerPerTeam )
try container . encode ( maximumPlayerPerTeam , forKey : . _maximumPlayerPerTeam )
try container . encode ( information , forKey : . _information )
try container . encode ( displayEntryFeeInformation , forKey : . _displayEntryFeeInformation )
}
fileprivate func _encodePayment ( container : inout KeyedEncodingContainer < CodingKeys > ) throws {