TeraTodayPageModels.swift (888B)
1 import Foundation 2 3 struct TeraTodayPageRequest: Sendable, Equatable { 4 let context: TeraLocalNetwork 5 let limit: UInt16 6 let asOfUnixSeconds: UInt64? 7 let cursor: String? 8 let viewerTimeZone: String? 9 10 static func first( 11 context: TeraLocalNetwork, 12 limit: UInt16, 13 asOfUnixSeconds: UInt64, 14 timeZone: TimeZone = .current 15 ) -> Self { 16 Self(context: context, limit: limit, asOfUnixSeconds: asOfUnixSeconds, cursor: nil, viewerTimeZone: timeZone.identifier) 17 } 18 19 static func after(context: TeraLocalNetwork, limit: UInt16, cursor: String) -> Self { 20 Self(context: context, limit: limit, asOfUnixSeconds: nil, cursor: cursor, viewerTimeZone: nil) 21 } 22 } 23 24 struct TeraTodayPage: Sendable, Equatable { 25 let asOfUnixSeconds: UInt64 26 let items: [TeraTodayCard] 27 let nextCursor: String? 28 var projectionGeneration: UInt64? 29 let calendar: TeraViewerCalendarContext 30 }