initial commit
This commit is contained in:
37
IrisCompanion/iris/Models/Winner.swift
Normal file
37
IrisCompanion/iris/Models/Winner.swift
Normal file
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// Winner.swift
|
||||
// iris
|
||||
//
|
||||
// Created by Codex.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
enum WinnerType: String, Codable, CaseIterable {
|
||||
case weatherAlert = "WEATHER_ALERT"
|
||||
case weatherWarning = "WEATHER_WARNING"
|
||||
case transit = "TRANSIT"
|
||||
case poiNearby = "POI_NEARBY"
|
||||
case info = "INFO"
|
||||
case nowPlaying = "NOW_PLAYING"
|
||||
case currentWeather = "CURRENT_WEATHER"
|
||||
case allQuiet = "ALL_QUIET"
|
||||
}
|
||||
|
||||
struct Winner: Codable, Equatable {
|
||||
let id: String
|
||||
let type: WinnerType
|
||||
let title: String
|
||||
let subtitle: String
|
||||
let priority: Double
|
||||
let ttlSec: Int
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case id
|
||||
case type
|
||||
case title
|
||||
case subtitle
|
||||
case priority
|
||||
case ttlSec = "ttl_sec"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user