Skip to content

Commit 66d4fef

Browse files
authored
Merge pull request #119 from DSM-PICK/feature/(#118)-Combine_Refacotring
🔗 :: (#118) Combine Refacotring
2 parents 4a37601 + f2ecc28 commit 66d4fef

103 files changed

Lines changed: 576 additions & 1028 deletions

File tree

Some content is hidden

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

Projects/App/Project.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,6 @@ let appDependencies: [TargetDependency] = [
127127
.Projects.bugReportDomainInterface,
128128
.Projects.changePasswordDomain,
129129
.Projects.changePasswordDomainInterface,
130-
.Projects.teacherDomain,
131-
.Projects.teacherDomainInterface,
132130
.Projects.core,
133131
.Shared.thirdPartyLib,
134132
.Shared.utility

Projects/Domain/AcceptDomain/Interface/AcceptDomainInterface.swift

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import Foundation
2+
import Combine
23

34
public protocol AcceptRepository {
4-
func getApplicationsByGrade(grade: Int, classNum: Int) async throws -> [ApplicationEntity] // 반별로 외출 신청자 조회
5-
func getApplicationsByFloor(floor: Int) async throws -> [ClassroomMoveEntity] // 층별로 교실 이동 신청자 조회
6-
func getClassroomMovesByGrade(grade: Int, classNum: Int) async throws -> [ClassroomMoveEntity] // 반별로 교실 이동자 조회 (사용하지 않음)
7-
func updateApplicationStatus(status: String, idList: [String]) async throws // 외출 수락/거절
8-
func updateClassroomMoveStatus(status: String, idList: [String]) async throws // 교실 이동 수락/거절
9-
func getEarlyReturnByGrade(grade: Int, classNum: Int) async throws -> [EarlyReturnAcceptEntity]
10-
func updateEarlyReturnStatus(status: String, idList: [String]) async throws
5+
func getApplicationsByGrade(grade: Int, classNum: Int) -> AnyPublisher<[ApplicationEntity], Error>
6+
func getApplicationsByFloor(floor: Int) -> AnyPublisher<[ClassroomMoveEntity], Error>
7+
func getClassroomMovesByGrade(grade: Int, classNum: Int) -> AnyPublisher<[ClassroomMoveEntity], Error>
8+
func updateApplicationStatus(status: String, idList: [String]) -> AnyPublisher<Void, Error>
9+
func updateClassroomMoveStatus(status: String, idList: [String]) -> AnyPublisher<Void, Error>
10+
func getEarlyReturnByGrade(grade: Int, classNum: Int) -> AnyPublisher<[EarlyReturnAcceptEntity], Error>
11+
func updateEarlyReturnStatus(status: String, idList: [String]) -> AnyPublisher<Void, Error>
1112
}
1213

1314
public struct ApplicationEntity: Equatable, Identifiable {
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Foundation
2+
import Combine
23

34
public protocol GetAllApplicationsUseCaseProtocol {
4-
func execute(grade: Int, classNum: Int) async throws -> [ApplicationEntity]
5+
func execute(grade: Int, classNum: Int) -> AnyPublisher<[ApplicationEntity], Error>
56
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Foundation
2+
import Combine
23

34
public protocol GetApplicationsByFloorUseCaseProtocol {
4-
func execute(floor: Int) async throws -> [ClassroomMoveEntity]
5+
func execute(floor: Int) -> AnyPublisher<[ClassroomMoveEntity], Error>
56
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Foundation
2+
import Combine
23

34
public protocol GetClassroomMovesUseCaseProtocol {
4-
func execute(grade: Int, classNum: Int) async throws -> [ClassroomMoveEntity]
5+
func execute(grade: Int, classNum: Int) -> AnyPublisher<[ClassroomMoveEntity], Error>
56
}
67

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import Foundation
2+
import Combine
23

34
public protocol GetEarlyReturnByGradeUseCaseProtocol {
4-
func execute(grade: Int, classNum: Int) async throws -> [EarlyReturnAcceptEntity]
5+
func execute(grade: Int, classNum: Int) -> AnyPublisher<[EarlyReturnAcceptEntity], Error>
56
}
7+
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Foundation
2+
import Combine
23

34
public protocol UpdateApplicationStatusUseCaseProtocol {
4-
func execute(status: String, idList: [String]) async throws
5+
func execute(status: String, idList: [String]) -> AnyPublisher<Void, Error>
56
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Foundation
2+
import Combine
23

34
public protocol UpdateClassroomMoveStatusUseCaseProtocol {
4-
func execute(status: String, idList: [String]) async throws
5+
func execute(status: String, idList: [String]) -> AnyPublisher<Void, Error>
56
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Foundation
2+
import Combine
23

34
public protocol UpdateEarlyReturnStatusUseCaseProtocol {
4-
func execute(status: String, idList: [String]) async throws
5+
func execute(status: String, idList: [String]) -> AnyPublisher<Void, Error>
56
}
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import Foundation
2+
import Combine
23

34
public protocol AcceptDataSource {
4-
func getApplicationsByGrade(grade: Int, classNum: Int) async throws -> ApplicationListResponseDTO
5-
func getApplicationsByFloor(floor: Int) async throws -> ClassroomMoveListResponseDTO
6-
func getClassroomMovesByGrade(grade: Int, classNum: Int) async throws -> ClassroomMoveListResponseDTO
7-
func getEarlyReturnByGrade(grade: Int, classNum: Int) async throws -> EarlyReturnListResponseDTO
8-
func updateApplicationStatus(status: String, idList: [String]) async throws
9-
func updateClassroomMoveStatus(status: String, idList: [String]) async throws
10-
func updateEarlyReturnStatus(status: String, idList: [String]) async throws
5+
func getApplicationsByGrade(grade: Int, classNum: Int) -> AnyPublisher<ApplicationListResponseDTO, Error>
6+
func getApplicationsByFloor(floor: Int) -> AnyPublisher<ClassroomMoveListResponseDTO, Error>
7+
func getClassroomMovesByGrade(grade: Int, classNum: Int) -> AnyPublisher<ClassroomMoveListResponseDTO, Error>
8+
func getEarlyReturnByGrade(grade: Int, classNum: Int) -> AnyPublisher<EarlyReturnListResponseDTO, Error>
9+
func updateApplicationStatus(status: String, idList: [String]) -> AnyPublisher<Void, Error>
10+
func updateClassroomMoveStatus(status: String, idList: [String]) -> AnyPublisher<Void, Error>
11+
func updateEarlyReturnStatus(status: String, idList: [String]) -> AnyPublisher<Void, Error>
1112
}

0 commit comments

Comments
 (0)