This commit is contained in:
Trey t
2026-01-19 23:21:33 -06:00
parent 6cddf601e3
commit 19dd1791f1
6 changed files with 121 additions and 6 deletions

View File

@@ -121,6 +121,7 @@ final class CanonicalStadium {
var yearOpened: Int?
var imageURL: String?
var sport: String
var timezoneIdentifier: String?
// User-correctable fields (preserved during sync)
var userNickname: String?
@@ -145,7 +146,8 @@ final class CanonicalStadium {
capacity: Int,
yearOpened: Int? = nil,
imageURL: String? = nil,
sport: String
sport: String,
timezoneIdentifier: String? = nil
) {
self.canonicalId = canonicalId
self.uuid = uuid ?? Self.deterministicUUID(from: canonicalId)
@@ -161,6 +163,7 @@ final class CanonicalStadium {
self.yearOpened = yearOpened
self.imageURL = imageURL
self.sport = sport
self.timezoneIdentifier = timezoneIdentifier
}
var source: DataSource {
@@ -181,7 +184,8 @@ final class CanonicalStadium {
capacity: capacity,
sport: Sport(rawValue: sport) ?? .mlb,
yearOpened: yearOpened,
imageURL: imageURL.flatMap { URL(string: $0) }
imageURL: imageURL.flatMap { URL(string: $0) },
timeZoneIdentifier: timezoneIdentifier
)
}