|
|
|
|
@ -69,6 +69,7 @@ class BaseTournament: SyncedModelObject, SyncedStorable { |
|
|
|
|
var hideUmpireMail: Bool = false |
|
|
|
|
var hideUmpirePhone: Bool = true |
|
|
|
|
var disableRankingFederalRuling: Bool = false |
|
|
|
|
var teamCountLimit: Bool = true |
|
|
|
|
|
|
|
|
|
init( |
|
|
|
|
id: String = Store.randomId(), |
|
|
|
|
@ -128,7 +129,8 @@ class BaseTournament: SyncedModelObject, SyncedStorable { |
|
|
|
|
umpireCustomPhone: String? = nil, |
|
|
|
|
hideUmpireMail: Bool = false, |
|
|
|
|
hideUmpirePhone: Bool = true, |
|
|
|
|
disableRankingFederalRuling: Bool = false |
|
|
|
|
disableRankingFederalRuling: Bool = false, |
|
|
|
|
teamCountLimit: Bool = true |
|
|
|
|
) { |
|
|
|
|
super.init() |
|
|
|
|
self.id = id |
|
|
|
|
@ -189,6 +191,7 @@ class BaseTournament: SyncedModelObject, SyncedStorable { |
|
|
|
|
self.hideUmpireMail = hideUmpireMail |
|
|
|
|
self.hideUmpirePhone = hideUmpirePhone |
|
|
|
|
self.disableRankingFederalRuling = disableRankingFederalRuling |
|
|
|
|
self.teamCountLimit = teamCountLimit |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
enum CodingKeys: String, CodingKey { |
|
|
|
|
@ -250,6 +253,7 @@ class BaseTournament: SyncedModelObject, SyncedStorable { |
|
|
|
|
case _hideUmpireMail = "hideUmpireMail" |
|
|
|
|
case _hideUmpirePhone = "hideUmpirePhone" |
|
|
|
|
case _disableRankingFederalRuling = "disableRankingFederalRuling" |
|
|
|
|
case _teamCountLimit = "teamCountLimit" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private static func _decodePayment(container: KeyedDecodingContainer<CodingKeys>) throws -> TournamentPayment? { |
|
|
|
|
@ -373,6 +377,7 @@ class BaseTournament: SyncedModelObject, SyncedStorable { |
|
|
|
|
self.hideUmpireMail = try container.decodeIfPresent(Bool.self, forKey: ._hideUmpireMail) ?? false |
|
|
|
|
self.hideUmpirePhone = try container.decodeIfPresent(Bool.self, forKey: ._hideUmpirePhone) ?? true |
|
|
|
|
self.disableRankingFederalRuling = try container.decodeIfPresent(Bool.self, forKey: ._disableRankingFederalRuling) ?? false |
|
|
|
|
self.teamCountLimit = try container.decodeIfPresent(Bool.self, forKey: ._teamCountLimit) ?? true |
|
|
|
|
try super.init(from: decoder) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -436,6 +441,7 @@ class BaseTournament: SyncedModelObject, SyncedStorable { |
|
|
|
|
try container.encode(self.hideUmpireMail, forKey: ._hideUmpireMail) |
|
|
|
|
try container.encode(self.hideUmpirePhone, forKey: ._hideUmpirePhone) |
|
|
|
|
try container.encode(self.disableRankingFederalRuling, forKey: ._disableRankingFederalRuling) |
|
|
|
|
try container.encode(self.teamCountLimit, forKey: ._teamCountLimit) |
|
|
|
|
try super.encode(to: encoder) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -504,6 +510,7 @@ class BaseTournament: SyncedModelObject, SyncedStorable { |
|
|
|
|
self.hideUmpireMail = tournament.hideUmpireMail |
|
|
|
|
self.hideUmpirePhone = tournament.hideUmpirePhone |
|
|
|
|
self.disableRankingFederalRuling = tournament.disableRankingFederalRuling |
|
|
|
|
self.teamCountLimit = tournament.teamCountLimit |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static func relationships() -> [Relationship] { |
|
|
|
|
|