Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
c489f3b
chore: 기존 복덕방 화면 삭제 및 진입점 비활성화
hgjwilly Nov 22, 2026
311e6db
chore: pbxproj 정렬
hgjwilly Nov 22, 2026
a89ee57
feat: 복덕방 목록·상세 API 응답 모델 변경 및 좌표 모델 추가
hgjwilly Nov 22, 2026
5ced201
design: 복덕방 이미지를 지도 마커·클러스터·확대축소 이미지로 교체
hgjwilly Nov 22, 2026
d093dd0
feat: 복덕방 목록 화면 구현
hgjwilly Nov 22, 2026
5561c28
feat: 카테고리에서 복덕방 목록 화면 진입 연결
hgjwilly Nov 22, 2026
5996e1b
feat: 바텀시트 드래그 비활성화 옵션 추가
hgjwilly Nov 23, 2026
80c858f
feat: 복덕방 상세 모델 nullable 필드 대응 및 표시 문구 추가
hgjwilly Nov 23, 2026
0b19bd1
refactor: 복덕방 지도 초기 위치 설정을 지도 뷰로 이동
hgjwilly Nov 23, 2026
442e703
fix: 복덕방 목록 진입 시 지도 이동 애니메이션 제거
hgjwilly Nov 23, 2026
b1332ab
chore: 복덕방 지도 최대 줌 제한 제거
hgjwilly Nov 23, 2026
330a14e
feat: 복덕방 상세 화면 구현
hgjwilly Nov 23, 2026
10bb413
feat: 복덕방 목록에서 상세 화면 진입 연결
hgjwilly Nov 23, 2026
9375146
feat: 복덕방 목록 API에 검색어 파라미터 추가
hgjwilly Nov 23, 2026
0df3a2e
design: 복덕방 검색 아이콘 이미지 추가
hgjwilly Nov 23, 2026
54006f8
feat: 복덕방 검색 화면 구현
hgjwilly Nov 23, 2026
8050cb2
feat: 복덕방 목록에서 검색 화면 진입 연결
hgjwilly Nov 23, 2026
564cddf
feat: 복덕방 검색 화면 키보드 처리 및 빈 결과 화면 레이아웃 개선
hgjwilly Nov 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 8 additions & 16 deletions Koin/Core/Asset/ImageAsset.swift
Original file line number Diff line number Diff line change
Expand Up @@ -188,22 +188,14 @@ public enum ImageAsset: String {
case write

// MARK: - Land
case option1
case option2
case option3
case option4
case option5
case option6
case option7
case option8
case option9
case option10
case option11
case option12
case option13
case option14
case option15
case option16
case landMarker
case landCluster2to3
case landCluster4to6
case landCluster7to9
case landCluster10to12
case landZoomIn
case landZoomOut
case landSearch

// MARK: - Logo
case bcsdSymbolLogo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ struct KoinBottomSheetConfiguration {
}

struct Behavior {
var isDraggable = true
var dismissOnDrag = true
var expandToFullScreenOnDrag = false
var expandToFullScreenOnKeyboard = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ extension KoinBottomSheetController: UIGestureRecognizerDelegate {
}

func configurePan() {
guard configuration.behavior.isDraggable else { return }
guard isPersistent
|| configuration.behavior.dismissOnDrag
|| configuration.behavior.expandToFullScreenOnDrag else { return }
Expand Down
101 changes: 33 additions & 68 deletions Koin/Data/DTOs/Decodable/Land/LandDetailDto.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,89 +3,54 @@
// koin
//
// Created by 김나훈 on 3/17/24.
// Nullable 2024.04.26
//

import Foundation

struct LandDetailDto: Decodable {
let optElectronicDoorLocks, optTv: Bool
let monthlyFee: String?
let optElevator, optWaterPurifier, optWasher: Bool
let id: Int
let name: String
let latitude: Double?
let charterFee: String?
let optVeranda: Bool
let createdAt: String
let description: String?
let longitude: Double?
let imageUrls: [String]?
let optGasRange, optInduction: Bool
let internalName: String?
let isDeleted: Bool
let updatedAt: String
let optBidet, optShoeCloset, optRefrigerator: Bool
let id: Int
let floor: Int?
let monthlyFee: String?
let charterFee: String?
let deposit: String?
let managementFee: String?
let optDesk, optCloset: Bool
let longitude: Double?
let address: String?
let optBed: Bool
let size: String?
let roomType: String?
let phone: String?
let optAirConditioner: Bool
let name: String?
let deposit: String?
let optMicrowave: Bool
let permalink, roomType: String?

enum CodingKeys: String, CodingKey {
case optElectronicDoorLocks = "opt_electronic_door_locks"
case optTv = "opt_tv"
case id, name, latitude, longitude
case imageUrls = "image_urls"
case monthlyFee = "monthly_fee"
case optElevator = "opt_elevator"
case optWaterPurifier = "opt_water_purifier"
case optWasher = "opt_washer"
case latitude
case charterFee = "charter_fee"
case optVeranda = "opt_veranda"
case createdAt = "created_at"
case description
case imageUrls = "image_urls"
case optGasRange = "opt_gas_range"
case optInduction = "opt_induction"
case internalName = "internal_name"
case isDeleted = "is_deleted"
case updatedAt = "updated_at"
case optBidet = "opt_bidet"
case optShoeCloset = "opt_shoe_closet"
case optRefrigerator = "opt_refrigerator"
case id, floor
case deposit
case managementFee = "management_fee"
case optDesk = "opt_desk"
case optCloset = "opt_closet"
case longitude, address
case optBed = "opt_bed"
case size, phone
case optAirConditioner = "opt_air_conditioner"
case name, deposit
case optMicrowave = "opt_microwave"
case permalink
case size
case roomType = "room_type"
case phone
}
func toDomain() -> LandDetailItem {
let charterFeeText: String
let depositText: String
let floorText: String
let sizeText: String
let isOptionExists: [Bool] = [optAirConditioner, optRefrigerator, optCloset, optTv, optMicrowave, optGasRange, optInduction, optWaterPurifier, optWasher, optBed, optDesk, optShoeCloset, optElectronicDoorLocks, optBidet, optVeranda, optElevator]
if let charterFee = charterFee { charterFeeText = "\(charterFee)만원" }
else { charterFeeText = "-" }
if let deposit = deposit { depositText = "\(deposit)만원" }
else { depositText = "-" }
if let floor = floor { floorText = "\(floor)층" }
else { floorText = "-" }
if let size = size { sizeText = "\(size)평" }
else { sizeText = "-" }
let roomOptionInfo: [String] = [monthlyFee ?? "", roomType ?? "-", charterFeeText, depositText, floorText, managementFee ?? "-", sizeText, phone ?? "-"]
return .init(roomOptionInfo: roomOptionInfo, landName: name ?? "-", imageUrls: imageUrls ?? [], address: address ?? "-", isOptionExists: isOptionExists, longitude: longitude ?? 0.0, latitude: latitude ?? 0.0)
}

extension LandDetailDto {
func toDomain() -> LandDetail {
return LandDetail(
id: id,
name: name,
coordinate: LandCoordinate(
latitude: latitude,
longitude: longitude
),
imageUrls: imageUrls ?? [],
monthlyFee: monthlyFee.flatMap { $0.isEmpty ? nil : $0 },
charterFee: charterFee.flatMap { $0.isEmpty ? nil : $0 },
deposit: deposit.flatMap { $0.isEmpty ? nil : $0 },
managementFee: managementFee.flatMap { $0.isEmpty ? nil : $0 },
size: size.flatMap { $0.isEmpty ? nil : $0 },
roomType: roomType.flatMap { $0.isEmpty ? nil : $0 },
phone: phone.flatMap { $0.isEmpty ? nil : $0 }
)
}
}
52 changes: 0 additions & 52 deletions Koin/Data/DTOs/Decodable/Land/LandDto.swift

This file was deleted.

19 changes: 19 additions & 0 deletions Koin/Data/DTOs/Decodable/Land/LandListDto.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// LandListDto.swift
// koin
//
// Created by 홍기정 on 11/23/26.
//

import Foundation

struct LandListDto: Decodable {
let lands: [LandRowDto]
}

extension LandListDto {
func toDomain() -> LandList {
LandList(rows: lands.map { $0.toDomain() })
}
}

46 changes: 46 additions & 0 deletions Koin/Data/DTOs/Decodable/Land/LandRowDto.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
//
// LandRowDto.swift
// koin
//
// Created by 홍기정 on 11/23/26.
//

import Foundation

struct LandRowDto: Decodable {
let id: Int
let name: String
let address: String?
let roomType: String?
let latitude: Double?
let longitude: Double?
let isMonthlyAvailable: Bool
let isCharterAvailable: Bool

enum CodingKeys: String, CodingKey {
case id, name
case address
case roomType = "room_type"
case latitude, longitude
case isMonthlyAvailable = "is_monthly_available"
case isCharterAvailable = "is_charter_available"
}
}

extension LandRowDto {
func toDomain() -> LandRow {
LandRow(
id: id,
name: name,
isMonthlyAvailable: isMonthlyAvailable,
isCharterAvailable: isCharterAvailable,
roomType: roomType,
address: address,
coordinate: LandCoordinate(
latitude: latitude,
longitude: longitude
)
)
}
}

10 changes: 10 additions & 0 deletions Koin/Data/DTOs/Encodable/Land/FetchLandListRequest.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//
// FetchLandListRequest.swift
// koin
//
// Created by 홍기정 on 11/24/26.
//

struct FetchLandListRequest: Encodable {
let query: String?
}
4 changes: 2 additions & 2 deletions Koin/Data/Repository/DefaultLandRepository.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ final class DefaultLandRepository: LandRepository {
self.service = service
}

func fetchLandList() -> AnyPublisher<LandDto, ErrorResponse> {
return service.fetchLandList()
func fetchLandList(requestModel: FetchLandListRequest) -> AnyPublisher<LandListDto, ErrorResponse> {
return service.fetchLandList(requestModel: requestModel)
}

func fetchLandDetail(requestModel: FetchLandDetailRequest) -> AnyPublisher<LandDetailDto, ErrorResponse> {
Expand Down
6 changes: 3 additions & 3 deletions Koin/Data/Service/LandService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ import Alamofire
import Combine

protocol LandService {
func fetchLandList() -> AnyPublisher<LandDto, ErrorResponse>
func fetchLandList(requestModel: FetchLandListRequest) -> AnyPublisher<LandListDto, ErrorResponse>
func fetchLandDetail(requestModel: FetchLandDetailRequest) -> AnyPublisher<LandDetailDto, ErrorResponse>
}

final class DefaultLandService: LandService {

private let networkService = NetworkService.shared

func fetchLandList() -> AnyPublisher<LandDto, ErrorResponse> {
return networkService.requestWithResponse(api: LandAPI.fetchLandList)
func fetchLandList(requestModel: FetchLandListRequest) -> AnyPublisher<LandListDto, ErrorResponse> {
return networkService.requestWithResponse(api: LandAPI.fetchLandList(requestModel))
}

func fetchLandDetail(requestModel: FetchLandDetailRequest) -> AnyPublisher<LandDetailDto, ErrorResponse> {
Expand Down
4 changes: 2 additions & 2 deletions Koin/Data/Service/Network/API/LandAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Foundation
import Alamofire

enum LandAPI {
case fetchLandList
case fetchLandList(FetchLandListRequest)
case fetchLandDetail(FetchLandDetailRequest)
}

Expand All @@ -36,7 +36,7 @@ extension LandAPI: Router, URLRequestConvertible {

public var parameters: Any? {
switch self {
case .fetchLandList: return nil
case .fetchLandList(let request): return try? request.toDictionary()
case .fetchLandDetail(let request): return try? request.toDictionary()
}
}
Expand Down
27 changes: 27 additions & 0 deletions Koin/Domain/Model/Land/LandCoordinate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//
// LandCoordinate.swift
// koin
//
// Created by 홍기정 on 11/22/26.
//

import Foundation

struct LandCoordinate: Equatable {
let latitude: Double
let longitude: Double
}

extension LandCoordinate {
init?(
latitude: Double?,
longitude: Double?
) {
if let latitude, let longitude {
self.latitude = latitude
self.longitude = longitude
} else {
return nil
}
}
}
Loading
Loading