Skip to content

Commit

Permalink
refactor: WeatherResult 사용하지 않는 내용 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhyunm committed Sep 17, 2023
1 parent 28846e1 commit 7f22d7f
Showing 1 changed file with 5 additions and 63 deletions.
68 changes: 5 additions & 63 deletions Diary/Model/DTO/WeatherResult.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,70 +6,12 @@
//

struct WeatherResult: Decodable {
let coord: Coord
let weather: [Weather]
let base: String
let main: Main
let visibility: Int
let wind: Wind
let clouds: Clouds
let date: Int
let sys: Sys
let timezone, id: Int
let name: String
let cod: Int

private enum CodingKeys: String, CodingKey {
case coord, weather, base, main, visibility, wind, clouds
case date = "dt"
case sys, timezone, id, name, cod
}
}

struct Coord: Decodable {
let longitude: Double
let latitude: Double

private enum CodingKeys: String, CodingKey {
case longitude = "lon"
case latitude = "lat"
struct Weather: Decodable {
let id: Int
let main: String
let description: String
let icon: String
}
}

struct Weather: Decodable {
let id: Int
let main: String
let description: String
let icon: String
}

struct Main: Decodable {
let temp, feelsLike, tempMin, tempMax: Double
let pressure, humidity, seaLevel, groundLevel: Int?

enum CodingKeys: String, CodingKey {
case temp
case feelsLike = "feels_like"
case tempMin = "temp_min"
case tempMax = "temp_max"
case pressure, humidity
case seaLevel = "sea_level"
case groundLevel = "grnd_level"
}
}

struct Sys: Decodable {
let type, id: Int
let country: String
let sunrise, sunset: Int
}

struct Clouds: Decodable {
let all: Int
}

struct Wind: Decodable {
let speed: Double
let deg: Int
let gust: Double?
}

0 comments on commit 7f22d7f

Please sign in to comment.