|
|
|
@ -44,6 +44,8 @@ class User: ModelObject, UserBase, Storable { |
|
|
|
var groupStageMatchFormatPreference: MatchFormat? |
|
|
|
var groupStageMatchFormatPreference: MatchFormat? |
|
|
|
var loserBracketMatchFormatPreference: MatchFormat? |
|
|
|
var loserBracketMatchFormatPreference: MatchFormat? |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var deviceId: String? |
|
|
|
|
|
|
|
|
|
|
|
init(username: String, email: String, firstName: String, lastName: String, phone: String?, country: String?) { |
|
|
|
init(username: String, email: String, firstName: String, lastName: String, phone: String?, country: String?) { |
|
|
|
self.username = username |
|
|
|
self.username = username |
|
|
|
self.firstName = firstName |
|
|
|
self.firstName = firstName |
|
|
|
@ -129,7 +131,7 @@ class User: ModelObject, UserBase, Storable { |
|
|
|
case _bracketMatchFormatPreference = "bracketMatchFormatPreference" |
|
|
|
case _bracketMatchFormatPreference = "bracketMatchFormatPreference" |
|
|
|
case _groupStageMatchFormatPreference = "groupStageMatchFormatPreference" |
|
|
|
case _groupStageMatchFormatPreference = "groupStageMatchFormatPreference" |
|
|
|
case _loserBracketMatchFormatPreference = "loserBracketMatchFormatPreference" |
|
|
|
case _loserBracketMatchFormatPreference = "loserBracketMatchFormatPreference" |
|
|
|
|
|
|
|
case _deviceId = "deviceId" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func encode(to encoder: Encoder) throws { |
|
|
|
func encode(to encoder: Encoder) throws { |
|
|
|
@ -212,6 +214,13 @@ class User: ModelObject, UserBase, Storable { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
try container.encodeNil(forKey: ._loserBracketMatchFormatPreference) |
|
|
|
try container.encodeNil(forKey: ._loserBracketMatchFormatPreference) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if let deviceId { |
|
|
|
|
|
|
|
try container.encode(deviceId, forKey: ._deviceId) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
try container.encodeNil(forKey: ._deviceId) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static func placeHolder() -> User { |
|
|
|
static func placeHolder() -> User { |
|
|
|
|