-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Trash 폴더 내부 Camera 관련 UseCase 제거
- FetchDailyMissionContentUseCase 추가 - MissionContentEntity, MissionTodayContentResponseDTO 추가 - CameraViewReactor Mission관련 비즈니스 로직 수정 - MissonDIContainer FetchMissionContentUseCase 의존성 추가
- Loading branch information
1 parent
0cc5460
commit 93648aa
Showing
13 changed files
with
126 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
34 changes: 34 additions & 0 deletions
34
...-iOS/Data/Sources/APIs/Mission/MissionAPI/DataMapping/MissonTodayContentResponseDTO.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// | ||
// MissonTodayContentResponseDTO.swift | ||
// Data | ||
// | ||
// Created by 김도현 on 11/25/24. | ||
// | ||
|
||
import Foundation | ||
|
||
import Domain | ||
|
||
struct MissonTodayContentResponseDTO: Decodable { | ||
let date: String | ||
let missionId: String | ||
let missionContent: String | ||
|
||
|
||
enum CodingKeys: String, CodingKey { | ||
case date | ||
case missionId = "id" | ||
case missionContent = "content" | ||
} | ||
} | ||
|
||
|
||
extension MissonTodayContentResponseDTO { | ||
public func toDomain() -> MissonTodayContentEntity { | ||
return .init( | ||
missionId: missionId, | ||
missionContent: missionContent, | ||
date: date | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
14th-team5-iOS/Domain/Sources/Entities/Mission/MissonTodayContentEntity.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
// MissonTodayContentEntity.swift | ||
// Domain | ||
// | ||
// Created by 김도현 on 11/25/24. | ||
// | ||
|
||
import Foundation | ||
|
||
public struct MissonTodayContentEntity { | ||
public let missionId: String | ||
public let missionContent: String | ||
public let date: String | ||
|
||
public init( | ||
missionId: String, | ||
missionContent: String, | ||
date: String | ||
) { | ||
self.missionId = missionId | ||
self.missionContent = missionContent | ||
self.date = date | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 0 additions & 30 deletions
30
...am5-iOS/Domain/Sources/Trash/Camera/UseCases/Mission/FetchCameraTodayMissionUseCase.swift
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
...eam5-iOS/Domain/Sources/Trash/Camera/UseCases/Profile/EditCameraProfileImageUseCase.swift
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
14th-team5-iOS/Domain/Sources/UseCases/Misson/FetchDailyMissonContentUseCase.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// FetchDailyMissonContentUseCase.swift | ||
// Domain | ||
// | ||
// Created by 김도현 on 11/25/24. | ||
// | ||
|
||
import Foundation | ||
|
||
import RxSwift | ||
|
||
|
||
public protocol FetchDailyMissonContentUseCaseProtocol { | ||
func execute() -> Observable<MissonTodayContentEntity?> | ||
} | ||
|
||
public final class FetchDailyMissonContentUseCase: FetchDailyMissonContentUseCaseProtocol { | ||
|
||
private let missionRepository: any MissionRepositoryProtocol | ||
|
||
public init(missionRepository: any MissionRepositoryProtocol) { | ||
self.missionRepository = missionRepository | ||
} | ||
|
||
public func execute() -> Observable<MissonTodayContentEntity?> { | ||
return missionRepository.fetchDailyMissonItem() | ||
} | ||
} |