diff --git a/SOPT-Stamp-iOS/Projects/Data/Sources/Repository/SettingRepository.swift b/SOPT-Stamp-iOS/Projects/Data/Sources/Repository/SettingRepository.swift index ca414383..1c592e6e 100644 --- a/SOPT-Stamp-iOS/Projects/Data/Sources/Repository/SettingRepository.swift +++ b/SOPT-Stamp-iOS/Projects/Data/Sources/Repository/SettingRepository.swift @@ -14,10 +14,10 @@ import Network public class SettingRepository { - private let networkService: UserService + private let networkService: AuthService private let cancelBag = CancelBag() - public init(service: UserService) { + public init(service: AuthService) { self.networkService = service } } diff --git a/SOPT-Stamp-iOS/Projects/Data/Sources/Transform/PasswordSettingTransform.swift b/SOPT-Stamp-iOS/Projects/Data/Sources/Transform/PasswordSettingTransform.swift new file mode 100644 index 00000000..f495cf0f --- /dev/null +++ b/SOPT-Stamp-iOS/Projects/Data/Sources/Transform/PasswordSettingTransform.swift @@ -0,0 +1,19 @@ +// +// PasswordSettingTransform.swift +// Data +// +// Created by sejin on 2022/12/26. +// Copyright © 2022 SOPT-Stamp-iOS. All rights reserved. +// + +import Foundation + +import Domain +import Network + +extension PasswordChangeEntity { + + public func toDomain() -> PasswordChangeModel { + return PasswordChangeModel.init() + } +} diff --git a/SOPT-Stamp-iOS/Projects/Domain/Sources/Model/PasswordChangeModel.swift b/SOPT-Stamp-iOS/Projects/Domain/Sources/Model/PasswordChangeModel.swift new file mode 100644 index 00000000..328749c5 --- /dev/null +++ b/SOPT-Stamp-iOS/Projects/Domain/Sources/Model/PasswordChangeModel.swift @@ -0,0 +1,16 @@ +// +// PasswordChangeModel.swift +// Domain +// +// Created by sejin on 2022/12/26. +// Copyright © 2022 SOPT-Stamp-iOS. All rights reserved. +// + +import Foundation + +public struct PasswordChangeModel { + + public init() { + + } +} diff --git a/SOPT-Stamp-iOS/Projects/Domain/Sources/RepositoryInterface/PasswordChangeRepositoryInterface.swift b/SOPT-Stamp-iOS/Projects/Domain/Sources/RepositoryInterface/PasswordChangeRepositoryInterface.swift new file mode 100644 index 00000000..c33321d4 --- /dev/null +++ b/SOPT-Stamp-iOS/Projects/Domain/Sources/RepositoryInterface/PasswordChangeRepositoryInterface.swift @@ -0,0 +1,13 @@ +// +// PasswordChangeRepositoryInterface.swift +// Domain +// +// Created by sejin on 2022/12/26. +// Copyright © 2022 SOPT-Stamp-iOS. All rights reserved. +// + +import Combine + +public protocol PasswordChangeRepositoryInterface { + +} diff --git a/SOPT-Stamp-iOS/Projects/Domain/Sources/UseCase/PasswordChangeUseCase.swift b/SOPT-Stamp-iOS/Projects/Domain/Sources/UseCase/PasswordChangeUseCase.swift new file mode 100644 index 00000000..35104a5c --- /dev/null +++ b/SOPT-Stamp-iOS/Projects/Domain/Sources/UseCase/PasswordChangeUseCase.swift @@ -0,0 +1,27 @@ +// +// PasswordChangeUseCase.swift +// Domain +// +// Created by sejin on 2022/12/26. +// Copyright © 2022 SOPT-Stamp-iOS. All rights reserved. +// + +import Combine + +public protocol PasswordChangeUseCase { + +} + +public class DefaultPasswordChangeUseCase { + + private let repository: PasswordChangeRepositoryInterface + private var cancelBag = Set() + + public init(repository: PasswordChangeRepositoryInterface) { + self.repository = repository + } +} + +extension DefaultPasswordChangeUseCase: PasswordChangeUseCase { + +} diff --git a/SOPT-Stamp-iOS/Projects/Modules/Network/Sources/Entity/PasswordChangeEntity.swift b/SOPT-Stamp-iOS/Projects/Modules/Network/Sources/Entity/PasswordChangeEntity.swift new file mode 100644 index 00000000..3016b72c --- /dev/null +++ b/SOPT-Stamp-iOS/Projects/Modules/Network/Sources/Entity/PasswordChangeEntity.swift @@ -0,0 +1,13 @@ +// +// PasswordChangeEntity.swift +// Network +// +// Created by sejin on 2022/12/26. +// Copyright © 2022 SOPT-Stamp-iOS. All rights reserved. +// + +import Foundation + +public struct PasswordChangeEntity { + +} diff --git a/SOPT-Stamp-iOS/Projects/Presentation/Sources/SettingScene/PasswordSettingScene/PasswordChangeVC.swift b/SOPT-Stamp-iOS/Projects/Presentation/Sources/SettingScene/PasswordSettingScene/PasswordChangeVC.swift new file mode 100644 index 00000000..c44a8f91 --- /dev/null +++ b/SOPT-Stamp-iOS/Projects/Presentation/Sources/SettingScene/PasswordSettingScene/PasswordChangeVC.swift @@ -0,0 +1,43 @@ +// +// PasswordChangeVC.swift +// Presentation +// +// Created by sejin on 2022/12/26. +// Copyright © 2022 SOPT-Stamp-iOS. All rights reserved. +// + +import UIKit + +import Combine + +import Core +import SnapKit +import Then + +public class PasswordChangeVC: UIViewController { + + // MARK: - Properties + + public var viewModel: PasswordChangeViewModel! + private var cancelBag = CancelBag() + + // MARK: - UI Components + + // MARK: - View Life Cycle + + public override func viewDidLoad() { + super.viewDidLoad() + self.bindViewModels() + } +} + +// MARK: - Methods + +extension PasswordChangeVC { + + private func bindViewModels() { + let input = PasswordChangeViewModel.Input() + let output = self.viewModel.transform(from: input, cancelBag: self.cancelBag) + } + +} diff --git a/SOPT-Stamp-iOS/Projects/Presentation/Sources/SettingScene/PasswordSettingScene/ViewModel/PasswordChangeViewModel.swift b/SOPT-Stamp-iOS/Projects/Presentation/Sources/SettingScene/PasswordSettingScene/ViewModel/PasswordChangeViewModel.swift new file mode 100644 index 00000000..96ab6ad8 --- /dev/null +++ b/SOPT-Stamp-iOS/Projects/Presentation/Sources/SettingScene/PasswordSettingScene/ViewModel/PasswordChangeViewModel.swift @@ -0,0 +1,52 @@ +// +// PasswordChangeViewModel.swift +// Presentation +// +// Created by sejin on 2022/12/26. +// Copyright © 2022 SOPT-Stamp-iOS. All rights reserved. +// + +import Foundation + +import Combine + +import Core +import Domain + +public class PasswordChangeViewModel: ViewModelType { + + private let useCase: PasswordChangeUseCase + private var cancelBag = CancelBag() + + // MARK: - Inputs + + public struct Input { + + } + + // MARK: - Outputs + + public struct Output { + + } + + // MARK: - init + + public init(useCase: PasswordChangeUseCase) { + self.useCase = useCase + } +} + +extension PasswordChangeViewModel { + public func transform(from input: Input, cancelBag: CancelBag) -> Output { + let output = Output() + self.bindOutput(output: output, cancelBag: cancelBag) + // input,output 상관관계 작성 + + return output + } + + private func bindOutput(output: Output, cancelBag: CancelBag) { + + } +} diff --git a/SOPT-Stamp-iOS/Projects/SOPT-Stamp-iOS/Sources/ModuleFactory/ModuleFactory.swift b/SOPT-Stamp-iOS/Projects/SOPT-Stamp-iOS/Sources/ModuleFactory/ModuleFactory.swift index 97c85304..ce3fcb2d 100644 --- a/SOPT-Stamp-iOS/Projects/SOPT-Stamp-iOS/Sources/ModuleFactory/ModuleFactory.swift +++ b/SOPT-Stamp-iOS/Projects/SOPT-Stamp-iOS/Sources/ModuleFactory/ModuleFactory.swift @@ -110,7 +110,7 @@ extension ModuleFactory: ModuleFactoryInterface { } public func makeSettingVC() -> SettingVC { - let repository = SettingRepository(service: userService) + let repository = SettingRepository(service: authService) let useCase = DefaultSettingUseCase(repository: repository) let viewModel = SettingViewModel(useCase: useCase) let settingVC = SettingVC()