diff --git a/Projects/App/Sources/Application/DI/StudyRooms/AppComponent+StudyRooms.swift b/Projects/App/Sources/Application/DI/StudyRooms/AppComponent+StudyRooms.swift index 9b81d419..f4b51844 100644 --- a/Projects/App/Sources/Application/DI/StudyRooms/AppComponent+StudyRooms.swift +++ b/Projects/App/Sources/Application/DI/StudyRooms/AppComponent+StudyRooms.swift @@ -39,4 +39,10 @@ public extension AppComponent { var fetchMyStudyRoomAppItemsUseCase: any FetchMyStudyRoomAppItemsUseCase { FetchMyStudyRoomAppItemsUseCaseImpl(studyRoomsRepository: studyRoomsRepository) } + + var fetchStudyroomTimeListUseCase: any FetchStudyroomTimeListUseCase { + shared { + FetchStudyroomTimeListUseCaseImpl(studyRoomsRepository: studyRoomsRepository) + } + } } diff --git a/Projects/App/Sources/Application/NeedleGenerated.swift b/Projects/App/Sources/Application/NeedleGenerated.swift index 4e5d6695..b92fc23b 100644 --- a/Projects/App/Sources/Application/NeedleGenerated.swift +++ b/Projects/App/Sources/Application/NeedleGenerated.swift @@ -320,6 +320,9 @@ private class StudyRoomListDependencyef56e26c25d5de596604Provider: StudyRoomList var fetchStudyAvailableTimeUseCase: any FetchStudyAvailableTimeUseCase { return appComponent.fetchStudyAvailableTimeUseCase } + var fetchStudyroomTimeListUseCase: any FetchStudyroomTimeListUseCase { + return appComponent.fetchStudyroomTimeListUseCase + } var studyRoomDetailComponent: StudyRoomDetailComponent { return appComponent.studyRoomDetailComponent } @@ -541,6 +544,7 @@ extension AppComponent: Registration { localTable["applyStudyRoomSeatUseCase-any ApplyStudyRoomSeatUseCase"] = { [unowned self] in self.applyStudyRoomSeatUseCase as Any } localTable["cancelStudyRoomSeatUseCase-any CancelStudyRoomSeatUseCase"] = { [unowned self] in self.cancelStudyRoomSeatUseCase as Any } localTable["fetchMyStudyRoomAppItemsUseCase-any FetchMyStudyRoomAppItemsUseCase"] = { [unowned self] in self.fetchMyStudyRoomAppItemsUseCase as Any } + localTable["fetchStudyroomTimeListUseCase-any FetchStudyroomTimeListUseCase"] = { [unowned self] in self.fetchStudyroomTimeListUseCase as Any } localTable["localAuthDataSource-any LocalAuthDataSource"] = { [unowned self] in self.localAuthDataSource as Any } localTable["remoteAuthDataSource-any RemoteAuthDataSource"] = { [unowned self] in self.remoteAuthDataSource as Any } localTable["authRepository-any AuthRepository"] = { [unowned self] in self.authRepository as Any } @@ -728,6 +732,7 @@ extension StudyRoomListComponent: Registration { public func registerItems() { keyPathToName[\StudyRoomListDependency.fetchStudyRoomListUseCase] = "fetchStudyRoomListUseCase-any FetchStudyRoomListUseCase" keyPathToName[\StudyRoomListDependency.fetchStudyAvailableTimeUseCase] = "fetchStudyAvailableTimeUseCase-any FetchStudyAvailableTimeUseCase" + keyPathToName[\StudyRoomListDependency.fetchStudyroomTimeListUseCase] = "fetchStudyroomTimeListUseCase-any FetchStudyroomTimeListUseCase" keyPathToName[\StudyRoomListDependency.studyRoomDetailComponent] = "studyRoomDetailComponent-StudyRoomDetailComponent" } } diff --git a/Projects/App/WatchApp/Support/Info.plist b/Projects/App/WatchApp/Support/Info.plist index 16c40c8d..c26d71b4 100644 --- a/Projects/App/WatchApp/Support/Info.plist +++ b/Projects/App/WatchApp/Support/Info.plist @@ -18,8 +18,6 @@ $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString 1 - WKWatchKitApp - CFBundleVersion 1 UISupportedInterfaceOrientations @@ -29,5 +27,7 @@ WKCompanionAppBundleIdentifier com.team.aliens.DMS-Aliens + WKWatchKitApp + diff --git a/Projects/Features/StudyRoomFeature/Sources/StudyroomApplication/StudyRoomListComponent.swift b/Projects/Features/StudyRoomFeature/Sources/StudyroomApplication/StudyRoomListComponent.swift index a180eda6..24431020 100644 --- a/Projects/Features/StudyRoomFeature/Sources/StudyroomApplication/StudyRoomListComponent.swift +++ b/Projects/Features/StudyRoomFeature/Sources/StudyroomApplication/StudyRoomListComponent.swift @@ -6,6 +6,7 @@ import NeedleFoundation public protocol StudyRoomListDependency: Dependency { var fetchStudyRoomListUseCase: any FetchStudyRoomListUseCase { get } var fetchStudyAvailableTimeUseCase: any FetchStudyAvailableTimeUseCase { get } + var fetchStudyroomTimeListUseCase: any FetchStudyroomTimeListUseCase { get } var studyRoomDetailComponent: StudyRoomDetailComponent { get } } @@ -14,7 +15,8 @@ public final class StudyRoomListComponent: Component { StudyRoomListView( viewModel: .init( fetchStudyRoomListUseCase: dependency.fetchStudyRoomListUseCase, - fetchStudyAvailableTimeUseCase: dependency.fetchStudyAvailableTimeUseCase + fetchStudyAvailableTimeUseCase: dependency.fetchStudyAvailableTimeUseCase, + fetchStudyroomTimeListUseCase: dependency.fetchStudyroomTimeListUseCase ), studyRoomDetailComponent: dependency.studyRoomDetailComponent ) diff --git a/Projects/Features/StudyRoomFeature/Sources/StudyroomApplication/StudyRoomListView.swift b/Projects/Features/StudyRoomFeature/Sources/StudyroomApplication/StudyRoomListView.swift index f20a64b1..16561103 100644 --- a/Projects/Features/StudyRoomFeature/Sources/StudyroomApplication/StudyRoomListView.swift +++ b/Projects/Features/StudyRoomFeature/Sources/StudyroomApplication/StudyRoomListView.swift @@ -77,14 +77,7 @@ struct StudyRoomListView: View { sheetCornerRadiusValue: 8 ) { DeferView { - StudyroomTimeListView( - isClicked: false, - okButtonAction: { - withAnimation { - viewModel.isStudyTimeBottomSheet = false - } - } - ) + StudyroomTimeListView(viewModel: viewModel) } } .dmsToast(isShowing: $viewModel.isErrorOcuured, message: viewModel.errorMessage, style: .error) diff --git a/Projects/Features/StudyRoomFeature/Sources/StudyroomApplication/StudyRoomListViewModel.swift b/Projects/Features/StudyRoomFeature/Sources/StudyroomApplication/StudyRoomListViewModel.swift index 87dbd2bd..06a84efc 100644 --- a/Projects/Features/StudyRoomFeature/Sources/StudyroomApplication/StudyRoomListViewModel.swift +++ b/Projects/Features/StudyRoomFeature/Sources/StudyroomApplication/StudyRoomListViewModel.swift @@ -10,9 +10,13 @@ final class StudyRoomListViewModel: BaseViewModel { @Published var isStudyRoomTime = true @Published var isShowingToast = false @Published var toastMessage = "" - @Published var studyAvailableTime: StudyAvailableTimeEntity? + @Published var isNavigateDetail: Bool = false @Published var isStudyTimeBottomSheet: Bool = false + + @Published var studyroomTimeList = StudyroomTimeListEntity(timeSlots: []) + @Published var selectedTimeEntity: TimeSlotsEntity? + @Published var studyAvailableTime: StudyAvailableTimeEntity? @Published var studyRoomDetail: StudyRoomEntity = .init( id: "", floor: 0, @@ -36,13 +40,16 @@ final class StudyRoomListViewModel: BaseViewModel { private let fetchStudyRoomListUseCase: any FetchStudyRoomListUseCase private let fetchStudyAvailableTimeUseCase: any FetchStudyAvailableTimeUseCase + private let fetchStudyroomTimeListUseCase: any FetchStudyroomTimeListUseCase public init( fetchStudyRoomListUseCase: any FetchStudyRoomListUseCase, - fetchStudyAvailableTimeUseCase: any FetchStudyAvailableTimeUseCase + fetchStudyAvailableTimeUseCase: any FetchStudyAvailableTimeUseCase, + fetchStudyroomTimeListUseCase: any FetchStudyroomTimeListUseCase ) { self.fetchStudyRoomListUseCase = fetchStudyRoomListUseCase self.fetchStudyAvailableTimeUseCase = fetchStudyAvailableTimeUseCase + self.fetchStudyroomTimeListUseCase = fetchStudyroomTimeListUseCase super.init() } @@ -62,6 +69,14 @@ final class StudyRoomListViewModel: BaseViewModel { } } + func fetchStudyroomTimeList() { + addCancellable( + fetchStudyroomTimeListUseCase.execute() + ) { [weak self] studyroomTimeList in + self?.studyroomTimeList = studyroomTimeList + } + } + func onAppear() { fetchStudyRoomList() fetchStudyAvailableTime() diff --git a/Projects/Features/StudyRoomFeature/Sources/StudyroomApplication/StudyroomTimeList/StudyroomTimeListCellView.swift b/Projects/Features/StudyRoomFeature/Sources/StudyroomApplication/StudyroomTimeList/StudyroomTimeListCellView.swift new file mode 100644 index 00000000..5b939be1 --- /dev/null +++ b/Projects/Features/StudyRoomFeature/Sources/StudyroomApplication/StudyroomTimeList/StudyroomTimeListCellView.swift @@ -0,0 +1,50 @@ +import DomainModule +import DesignSystem +import SwiftUI + +struct StudyroomTimeListCellView: View { + var isSelected: Bool = false + var timeSlots: TimeSlotsEntity + let buttonAction: () -> Void + + public init( + isSelected: Bool, + timeSlots: TimeSlotsEntity, + buttonAction: @escaping () -> Void + ) { + self.isSelected = isSelected + self.timeSlots = timeSlots + self.buttonAction = buttonAction + } + + var body: some View { + HStack { + Button { + if !isSelected { + buttonAction() + } + } label: { + Text("\(timeSlots.startTime) ~ \(timeSlots.endTime)") + .padding(.horizontal, 16) + .padding(.vertical, 14) + .dmsFont( + .etc(.button), + color: isSelected ? .GrayScale.gray1 : .GrayScale.gray4 + ) + .background( + isSelected ? Color.PrimaryVariant.primary : Color.GrayScale.gray1 + ) + } + .overlay( + RoundedRectangle(cornerRadius: 5) + .inset(by: 1) + .stroke( + isSelected ? Color.System.primary : Color.GrayScale.gray4, + lineWidth: 2 + ) + ) + .cornerRadius(5) + .padding(.horizontal, 5) + } + } +} diff --git a/Projects/Features/StudyRoomFeature/Sources/StudyroomApplication/StudyroomTimeList/StudyroomTimeListView.swift b/Projects/Features/StudyRoomFeature/Sources/StudyroomApplication/StudyroomTimeList/StudyroomTimeListView.swift new file mode 100644 index 00000000..be0e1992 --- /dev/null +++ b/Projects/Features/StudyRoomFeature/Sources/StudyroomApplication/StudyroomTimeList/StudyroomTimeListView.swift @@ -0,0 +1,42 @@ +import DesignSystem +import DomainModule +import SwiftUI + +struct StudyroomTimeListView: View { + @StateObject var viewModel: StudyRoomListViewModel + + var body: some View { + VStack(alignment: .leading, spacing: 37) { + Text("시간") + .dmsFont(.title(.subTitle1), color: .GrayScale.gray10) + .frame(height: 28) + .padding(.top, 40) + .padding(.leading, 24) + + ScrollView(.horizontal, showsIndicators: false) { + LazyHStack { + ForEach(viewModel.studyroomTimeList.timeSlots, id: \.self) { timeSlots in + StudyroomTimeListCellView( + isSelected: timeSlots.id == viewModel.selectedTimeEntity?.id, + timeSlots: timeSlots, + buttonAction: { + viewModel.selectedTimeEntity = timeSlots + } + ) + } + } + .padding(.horizontal, 19) + .padding(.bottom, 10) + } + + DMSWideButton(text: "확인", style: .contained, color: .PrimaryVariant.primary) { + viewModel.isStudyTimeBottomSheet = false + } + .padding(.horizontal, 24) + .padding(.bottom) + } + .onAppear { + viewModel.fetchStudyroomTimeList() + } + } +} diff --git a/Projects/Features/StudyRoomFeature/Sources/StudyroomApplication/StudyroomTimeListView.swift b/Projects/Features/StudyRoomFeature/Sources/StudyroomApplication/StudyroomTimeListView.swift deleted file mode 100644 index e85dcc99..00000000 --- a/Projects/Features/StudyRoomFeature/Sources/StudyroomApplication/StudyroomTimeListView.swift +++ /dev/null @@ -1,69 +0,0 @@ -import Foundation -import DesignSystem -import SwiftUI - -struct StudyroomTimeListView: View { - @State var isClicked: Bool = false - let okButtonAction: () -> Void - public init( - isClicked: Bool, - okButtonAction: @escaping () -> Void - ) { - self.isClicked = isClicked - self.okButtonAction = okButtonAction - } - - var body: some View { - VStack(alignment: .leading, spacing: 37) { - Text("시간") - .dmsFont(.title(.subTitle1), color: .GrayScale.gray10) - .frame(height: 28) - .padding(.top, 40) - .padding(.leading, 24) - - ScrollView(.horizontal, showsIndicators: false) { - LazyHStack { - ForEach(0..<5) { _ in - Button { - isClicked.toggle() - } label: { - Text("10시 ~ 11시") - .padding(.horizontal, 16) - .padding(.vertical, 14) - .dmsFont( - .etc(.button), - color: isClicked ? .GrayScale.gray1 : .GrayScale.gray4 - ) - .background { - isClicked ? Color.PrimaryVariant.primary : Color.GrayScale.gray1 - } - } - .overlay( - RoundedRectangle(cornerRadius: 5) - .inset(by: 1) - .stroke( - isClicked ? Color.System.primary : Color.GrayScale.gray4, - lineWidth: 2 - ) - ) - .cornerRadius(5) - .padding(.horizontal, 5) - } - } - } - .padding(.horizontal, 19) - .padding(.bottom, 10) - - DMSWideButton( - text: "확인", - style: .contained, - color: .PrimaryVariant.primary, - action: { - okButtonAction() - } - ) - .padding(.horizontal, 24) - .padding(.bottom) - } - } -} diff --git a/Projects/Services/APIKit/Sources/StudyRoomsAPI.swift b/Projects/Services/APIKit/Sources/StudyRoomsAPI.swift index 5ba53ad5..77bab8eb 100644 --- a/Projects/Services/APIKit/Sources/StudyRoomsAPI.swift +++ b/Projects/Services/APIKit/Sources/StudyRoomsAPI.swift @@ -10,6 +10,7 @@ public enum StudyRoomsAPI { case fetchMyStudyRoomApplicationItems case applyStudyRoomSeat(seatID: String) case cancelStudyRoomSeat + case fetchStudyroomTimeList } extension StudyRoomsAPI: DmsAPI { @@ -39,13 +40,17 @@ extension StudyRoomsAPI: DmsAPI { case .fetchMyStudyRoomApplicationItems: return "/my" + + case .fetchStudyroomTimeList: + return "/time-slots" } } public var method: Moya.Method { switch self { - case .fetchStudyAvailableTime, .fetchSeatTypes, - .fetchStudyRoomList, .fetchDetailStudyRoom, .fetchMyStudyRoomApplicationItems: + case .fetchStudyAvailableTime, .fetchSeatTypes, .fetchStudyRoomList, + .fetchDetailStudyRoom, .fetchMyStudyRoomApplicationItems, + .fetchStudyroomTimeList: return .get case .applyStudyRoomSeat: diff --git a/Projects/Services/DataMappingModule/Sources/StudyRooms/Response/FetchStudyRoomTimeListResponseDTO.swift b/Projects/Services/DataMappingModule/Sources/StudyRooms/Response/FetchStudyRoomTimeListResponseDTO.swift new file mode 100644 index 00000000..91169b76 --- /dev/null +++ b/Projects/Services/DataMappingModule/Sources/StudyRooms/Response/FetchStudyRoomTimeListResponseDTO.swift @@ -0,0 +1,13 @@ +import Foundation + +public struct FetchStudyRoomTimeListResponseDTO: Decodable { + public init(timeSlots: [TimeSlotsResponseDTO]) { + self.timeSlots = timeSlots + } + + public let timeSlots: [TimeSlotsResponseDTO] + + enum CodingKeys: String, CodingKey { + case timeSlots = "time_slots" + } +} diff --git a/Projects/Services/DataMappingModule/Sources/StudyRooms/Response/TimeSlotsResponseDTO.swift b/Projects/Services/DataMappingModule/Sources/StudyRooms/Response/TimeSlotsResponseDTO.swift new file mode 100644 index 00000000..7a3007cd --- /dev/null +++ b/Projects/Services/DataMappingModule/Sources/StudyRooms/Response/TimeSlotsResponseDTO.swift @@ -0,0 +1,23 @@ +import Foundation + +public struct TimeSlotsResponseDTO: Decodable { + public init( + id: String, + startTime: String, + endTime: String + ) { + self.id = id + self.startTime = startTime + self.endTime = endTime + } + + public let id: String + public let startTime: String + public let endTime: String + + enum CodingKeys: String, CodingKey { + case id + case startTime = "start_time" + case endTime = "end_time" + } +} diff --git a/Projects/Services/DataModule/Sources/StudyRooms/Repositories/Impl/StudyRoomsRepositoryImpl.swift b/Projects/Services/DataModule/Sources/StudyRooms/Repositories/Impl/StudyRoomsRepositoryImpl.swift index dd47702f..79ce59e7 100644 --- a/Projects/Services/DataModule/Sources/StudyRooms/Repositories/Impl/StudyRoomsRepositoryImpl.swift +++ b/Projects/Services/DataModule/Sources/StudyRooms/Repositories/Impl/StudyRoomsRepositoryImpl.swift @@ -38,4 +38,8 @@ public struct StudyRoomsRepositoryImpl: StudyRoomsRepository { public func fetchMyStudyRoomApplicationItems() -> AnyPublisher { remoteStudyRoomsDataSource.fetchMyRemainApplicationItems() } + + public func fetchStudyroomTimeList() -> AnyPublisher { + remoteStudyRoomsDataSource.fetchStudyroomTimeList() + } } diff --git a/Projects/Services/DataModule/Sources/StudyRooms/UseCases/Impl/FetchStudyroomTimeListUseCaseImpl.swift b/Projects/Services/DataModule/Sources/StudyRooms/UseCases/Impl/FetchStudyroomTimeListUseCaseImpl.swift new file mode 100644 index 00000000..0cbf4e59 --- /dev/null +++ b/Projects/Services/DataModule/Sources/StudyRooms/UseCases/Impl/FetchStudyroomTimeListUseCaseImpl.swift @@ -0,0 +1,16 @@ +import Combine +import DataMappingModule +import DomainModule +import ErrorModule + +public struct FetchStudyroomTimeListUseCaseImpl: FetchStudyroomTimeListUseCase { + private let studyRoomsRepository: any StudyRoomsRepository + + public init(studyRoomsRepository: any StudyRoomsRepository) { + self.studyRoomsRepository = studyRoomsRepository + } + + public func execute() -> AnyPublisher { + studyRoomsRepository.fetchStudyroomTimeList() + } +} diff --git a/Projects/Services/DomainModule/Sources/Entities/StudyroomTimeListEntity.swift b/Projects/Services/DomainModule/Sources/Entities/StudyroomTimeListEntity.swift new file mode 100644 index 00000000..453c9652 --- /dev/null +++ b/Projects/Services/DomainModule/Sources/Entities/StudyroomTimeListEntity.swift @@ -0,0 +1,11 @@ +import Foundation + +public struct StudyroomTimeListEntity: Equatable, Hashable { + public init( + timeSlots: [TimeSlotsEntity] + ) { + self.timeSlots = timeSlots + } + + public let timeSlots: [TimeSlotsEntity] +} diff --git a/Projects/Services/DomainModule/Sources/Entities/TimeSlotsEntity.swift b/Projects/Services/DomainModule/Sources/Entities/TimeSlotsEntity.swift new file mode 100644 index 00000000..305c3341 --- /dev/null +++ b/Projects/Services/DomainModule/Sources/Entities/TimeSlotsEntity.swift @@ -0,0 +1,17 @@ +import Foundation + +public struct TimeSlotsEntity: Equatable, Hashable { + public init( + id: String, + startTime: String, + endTime: String + ) { + self.id = id + self.startTime = startTime + self.endTime = endTime + } + + public let id: String + public let startTime: String + public let endTime: String +} diff --git a/Projects/Services/DomainModule/Sources/Remains/Repository/RemainsRepository.swift b/Projects/Services/DomainModule/Sources/Remains/Repository/RemainsRepository.swift index 6a376a9c..8a3e49c7 100644 --- a/Projects/Services/DomainModule/Sources/Remains/Repository/RemainsRepository.swift +++ b/Projects/Services/DomainModule/Sources/Remains/Repository/RemainsRepository.swift @@ -6,6 +6,5 @@ public protocol RemainsRepository { func remainingApplicationsChanges(id: String) -> AnyPublisher func fetchMyRemainApplicationItems() -> AnyPublisher func fetchRemainsAvailableTime() -> AnyPublisher - func fetchRemainApplicationList() -> AnyPublisher + func fetchRemainApplicationList() -> AnyPublisher } diff --git a/Projects/Services/DomainModule/Sources/StudyRooms/Repository/StudyRoomsRepository.swift b/Projects/Services/DomainModule/Sources/StudyRooms/Repository/StudyRoomsRepository.swift index 5cd6d676..c8fdff67 100644 --- a/Projects/Services/DomainModule/Sources/StudyRooms/Repository/StudyRoomsRepository.swift +++ b/Projects/Services/DomainModule/Sources/StudyRooms/Repository/StudyRoomsRepository.swift @@ -10,4 +10,5 @@ public protocol StudyRoomsRepository { func applyStudyRoomSeat(seatID: String) -> AnyPublisher func cancelStudyRoomSeat() -> AnyPublisher func fetchMyStudyRoomApplicationItems() -> AnyPublisher + func fetchStudyroomTimeList() -> AnyPublisher } diff --git a/Projects/Services/DomainModule/Sources/StudyRooms/UseCases/FetchStudyroomTimeListUseCase.swift b/Projects/Services/DomainModule/Sources/StudyRooms/UseCases/FetchStudyroomTimeListUseCase.swift new file mode 100644 index 00000000..f312808e --- /dev/null +++ b/Projects/Services/DomainModule/Sources/StudyRooms/UseCases/FetchStudyroomTimeListUseCase.swift @@ -0,0 +1,7 @@ +import Combine +import DataMappingModule +import ErrorModule + +public protocol FetchStudyroomTimeListUseCase { + func execute() -> AnyPublisher +} diff --git a/Projects/Services/NetworkModule/Sources/StudyRooms/Remote/Impl/DataTransfer/FetchStudyroomTimeListDataTransfer.swift b/Projects/Services/NetworkModule/Sources/StudyRooms/Remote/Impl/DataTransfer/FetchStudyroomTimeListDataTransfer.swift new file mode 100644 index 00000000..9d2b805e --- /dev/null +++ b/Projects/Services/NetworkModule/Sources/StudyRooms/Remote/Impl/DataTransfer/FetchStudyroomTimeListDataTransfer.swift @@ -0,0 +1,20 @@ +import DataMappingModule +import DomainModule + +public extension FetchStudyRoomTimeListResponseDTO { + func toDomain() -> StudyroomTimeListEntity { + StudyroomTimeListEntity( + timeSlots: timeSlots.map { $0.toDomain() } + ) + } +} + +public extension TimeSlotsResponseDTO { + func toDomain() -> TimeSlotsEntity { + TimeSlotsEntity( + id: id, + startTime: startTime, + endTime: endTime + ) + } +} diff --git a/Projects/Services/NetworkModule/Sources/StudyRooms/Remote/Impl/RemoteStudyRoomsDataSourceImpl.swift b/Projects/Services/NetworkModule/Sources/StudyRooms/Remote/Impl/RemoteStudyRoomsDataSourceImpl.swift index 9aca39af..903e2b2f 100644 --- a/Projects/Services/NetworkModule/Sources/StudyRooms/Remote/Impl/RemoteStudyRoomsDataSourceImpl.swift +++ b/Projects/Services/NetworkModule/Sources/StudyRooms/Remote/Impl/RemoteStudyRoomsDataSourceImpl.swift @@ -5,6 +5,12 @@ import DomainModule import ErrorModule public final class RemoteStudyRoomsDataSourceImpl: BaseRemoteDataSource, RemoteStudyRoomsDataSource { + public func fetchStudyroomTimeList() -> AnyPublisher { + request(.fetchStudyroomTimeList, dto: FetchStudyRoomTimeListResponseDTO.self) + .map { $0.toDomain() } + .eraseToAnyPublisher() + } + public func fetchMyRemainApplicationItems() -> AnyPublisher { request(.fetchMyStudyRoomApplicationItems, dto: FetchMyStudyRoomApplicationItemsDTO.self) .map { $0.toDomain() } diff --git a/Projects/Services/NetworkModule/Sources/StudyRooms/Remote/RemoteStudyRoomsDataSource.swift b/Projects/Services/NetworkModule/Sources/StudyRooms/Remote/RemoteStudyRoomsDataSource.swift index 464986e9..0447e361 100644 --- a/Projects/Services/NetworkModule/Sources/StudyRooms/Remote/RemoteStudyRoomsDataSource.swift +++ b/Projects/Services/NetworkModule/Sources/StudyRooms/Remote/RemoteStudyRoomsDataSource.swift @@ -13,4 +13,5 @@ public protocol RemoteStudyRoomsDataSource { func applyStudyRoomSeat(seatID: String) -> AnyPublisher func cancelStudyRoomSeat() -> AnyPublisher func fetchMyRemainApplicationItems() -> AnyPublisher + func fetchStudyroomTimeList() -> AnyPublisher }