Skip to content

Commit b541997

Browse files
authored
Merge pull request #23 from YAPP-Github/feat/#21-Travel_Follow_Shop_Info
Feat/#21 travel follow shop info
2 parents 45a6017 + e018ce9 commit b541997

41 files changed

Lines changed: 2190 additions & 84 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Projects/Domain/Sources/Interface/Follow/FollowServiceProtocol.swift

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,14 @@ import Foundation
1010

1111
public protocol FollowServiceProtocol: Sendable {
1212
/// 여행 상세 정보 조회
13-
func fetchTravelDetail(id: Int) async -> Result<TravelDetail, FollowError>
13+
func fetchTravelDetail(id: Int) async -> Result<TravelDetail, ContentCardError>
1414

1515
/// 일차별 장소 목록 조회
16-
func fetchPlaces(travelId: Int, day: Int) async -> Result<[TravelPlace], FollowError>
16+
func fetchPlaces(travelId: Int, day: Int) async -> Result<[TravelPlace], ItineraryError>
17+
18+
/// 장소 상세 조회
19+
func fetchPlaceDetail(googlePlaceId: String) async -> Result<PlaceDetail, PlaceDetailError>
20+
21+
/// 장소 사진 조회
22+
func fetchPlacePhotos(googlePlaceId: String) async -> Result<[PlacePhoto], PlacePhotosError>
1723
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// ContentCardError.swift
3+
// Domain
4+
//
5+
// Created by kimnahun on 2026-02-09.
6+
// Copyright © 2026 NDGL-iOS. All rights reserved.
7+
//
8+
9+
import Foundation
10+
11+
/// 여행 템플릿 상세 조회 API 에러
12+
public enum ContentCardError: Error, Sendable {
13+
/// 여행 템플릿을 찾을 수 없음 (TRAVEL-02-001)
14+
case notFound(message: String)
15+
/// 서버 에러 (COMM-08-001)
16+
case serverError(message: String)
17+
/// 알 수 없는 에러
18+
case unknown(code: String, message: String)
19+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// ItineraryError.swift
3+
// Domain
4+
//
5+
// Created by kimnahun on 2026-02-09.
6+
// Copyright © 2026 NDGL-iOS. All rights reserved.
7+
//
8+
9+
import Foundation
10+
11+
/// 여행 템플릿 일정 조회 API 에러
12+
public enum ItineraryError: Error, Sendable {
13+
/// 여행 템플릿을 찾을 수 없음 (TRAVEL-02-001)
14+
case notFound(message: String)
15+
/// 서버 에러 (COMM-08-001)
16+
case serverError(message: String)
17+
/// 알 수 없는 에러
18+
case unknown(code: String, message: String)
19+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// PlaceDetailError.swift
3+
// Domain
4+
//
5+
// Created by kimnahun on 2026-02-09.
6+
// Copyright © 2026 NDGL-iOS. All rights reserved.
7+
//
8+
9+
import Foundation
10+
11+
/// 장소 상세 조회 API 에러
12+
public enum PlaceDetailError: Error, Sendable {
13+
/// 필수 요청 파라미터가 존재하지 않음 (COMM-01-006)
14+
case missingParameter(message: String)
15+
/// 장소를 찾을 수 없음 (PLACE-02-001)
16+
case notFound(message: String)
17+
/// 알 수 없는 에러
18+
case unknown(code: String, message: String)
19+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//
2+
// PlacePhotosError.swift
3+
// Domain
4+
//
5+
// Created by kimnahun on 2026-02-09.
6+
// Copyright © 2026 NDGL-iOS. All rights reserved.
7+
//
8+
9+
import Foundation
10+
11+
/// 장소 사진 조회 API 에러
12+
public enum PlacePhotosError: Error, Sendable {
13+
/// 필수 요청 파라미터가 존재하지 않음 (COMM-01-006)
14+
case missingParameter(message: String)
15+
/// 서버 에러 (COMM-08-001)
16+
case serverError(message: String)
17+
/// Google Maps Places API 호출 실패 (GMAP_PLACE-07-001)
18+
case googleApiError(message: String)
19+
/// 알 수 없는 에러
20+
case unknown(code: String, message: String)
21+
}

Projects/Domain/Sources/Model/Follow/FollowError.swift

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
//
2+
// PlaceDetail.swift
3+
// Domain
4+
//
5+
// Created by kimnahun on 2026-02-09.
6+
// Copyright © 2026 NDGL-iOS. All rights reserved.
7+
//
8+
9+
import Foundation
10+
11+
/// 장소 상세 정보
12+
public struct PlaceDetail: Hashable {
13+
public let id: String
14+
public let name: String
15+
public let thumbnail: String?
16+
public let nationalPhoneNumber: String?
17+
public let internationalPhoneNumber: String?
18+
public let formattedAddress: String?
19+
public let location: PlaceLocation
20+
public let userRatingCount: Int?
21+
public let rating: Double?
22+
public let regularOpeningHours: [String]?
23+
public let googleMapsUri: String?
24+
public let websiteUri: String?
25+
26+
public init(
27+
id: String,
28+
name: String,
29+
thumbnail: String? = nil,
30+
nationalPhoneNumber: String? = nil,
31+
internationalPhoneNumber: String? = nil,
32+
formattedAddress: String? = nil,
33+
location: PlaceLocation,
34+
userRatingCount: Int? = nil,
35+
rating: Double? = nil,
36+
regularOpeningHours: [String]? = nil,
37+
googleMapsUri: String? = nil,
38+
websiteUri: String? = nil
39+
) {
40+
self.id = id
41+
self.name = name
42+
self.thumbnail = thumbnail
43+
self.nationalPhoneNumber = nationalPhoneNumber
44+
self.internationalPhoneNumber = internationalPhoneNumber
45+
self.formattedAddress = formattedAddress
46+
self.location = location
47+
self.userRatingCount = userRatingCount
48+
self.rating = rating
49+
self.regularOpeningHours = regularOpeningHours
50+
self.googleMapsUri = googleMapsUri
51+
self.websiteUri = websiteUri
52+
}
53+
}
54+
55+
/// 장소 위치 정보
56+
public struct PlaceLocation: Hashable {
57+
public let latitude: Double
58+
public let longitude: Double
59+
60+
public init(latitude: Double, longitude: Double) {
61+
self.latitude = latitude
62+
self.longitude = longitude
63+
}
64+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//
2+
// PlacePhoto.swift
3+
// Domain
4+
//
5+
// Created by kimnahun on 2026-02-09.
6+
// Copyright © 2026 NDGL-iOS. All rights reserved.
7+
//
8+
9+
import Foundation
10+
11+
/// 장소 사진 정보
12+
public struct PlacePhoto: Hashable {
13+
public let photoUri: String
14+
public let widthPx: Int
15+
public let heightPx: Int
16+
17+
public init(photoUri: String, widthPx: Int, heightPx: Int) {
18+
self.photoUri = photoUri
19+
self.widthPx = widthPx
20+
self.heightPx = heightPx
21+
}
22+
}

Projects/Domain/Sources/Model/Travel/CreateTravelError.swift renamed to Projects/Domain/Sources/Model/Travel/Error/CreateTravelError.swift

File renamed without changes.

Projects/Domain/Sources/Model/Travel/TravelDetail.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ public struct YouTubeInfo: Hashable {
4343
public let youtuber: String
4444
public let thumbnail: String?
4545
public let profileImage: String?
46-
public let link: String
46+
public let link: String?
4747
public let summary: String
4848

4949
public init(
5050
title: String,
5151
youtuber: String,
5252
thumbnail: String?,
5353
profileImage: String?,
54-
link: String,
54+
link: String?,
5555
summary: String
5656
) {
5757
self.title = title

0 commit comments

Comments
 (0)