diff --git a/Projects/App/Project.swift b/Projects/App/Project.swift index f652e9c83..60766b2a5 100644 --- a/Projects/App/Project.swift +++ b/Projects/App/Project.swift @@ -40,7 +40,10 @@ let targets: [Target] = [ .domain(target: .ChartDomain), .domain(target: .FaqDomain), .domain(target: .LikeDomain), - .domain(target: .NoticeDomain) + .domain(target: .NoticeDomain), + .domain(target: .SongsDomain), + .domain(target: .PlayListDomain), + .domain(target: .UserDomain) ], settings: .settings( base: env.baseSetting, diff --git a/Projects/App/Sources/Application/AppComponent+Chart.swift b/Projects/App/Sources/Application/AppComponent+Chart.swift index 1b38597c4..674460f0c 100644 --- a/Projects/App/Sources/Application/AppComponent+Chart.swift +++ b/Projects/App/Sources/Application/AppComponent+Chart.swift @@ -1,7 +1,7 @@ -import ChartFeature -import CommonFeature import ChartDomain import ChartDomainInterface +import ChartFeature +import CommonFeature public extension AppComponent { var chartComponent: ChartComponent { diff --git a/Projects/App/Sources/Application/AppComponent+Faq.swift b/Projects/App/Sources/Application/AppComponent+Faq.swift index 06f9ef186..c35e2f712 100644 --- a/Projects/App/Sources/Application/AppComponent+Faq.swift +++ b/Projects/App/Sources/Application/AppComponent+Faq.swift @@ -7,11 +7,11 @@ // import CommonFeature +import FaqDomain +import FaqDomainInterface import NetworkModule import SignInFeature import StorageFeature -import FaqDomain -import FaqDomainInterface // MARK: 변수명 주의 // AppComponent 내 변수 == Dependency 내 변수 이름 같아야함 diff --git a/Projects/App/Sources/Application/AppComponent+Like.swift b/Projects/App/Sources/Application/AppComponent+Like.swift index 37a8d2e57..f615028d0 100644 --- a/Projects/App/Sources/Application/AppComponent+Like.swift +++ b/Projects/App/Sources/Application/AppComponent+Like.swift @@ -7,10 +7,10 @@ // import CommonFeature -import SignInFeature -import StorageFeature import LikeDomain import LikeDomainInterface +import SignInFeature +import StorageFeature // MARK: 변수명 주의 // AppComponent 내 변수 == Dependency 내 변수 이름 같아야함 diff --git a/Projects/App/Sources/Application/AppComponent+Notice.swift b/Projects/App/Sources/Application/AppComponent+Notice.swift index 1290a6bdd..91383209d 100644 --- a/Projects/App/Sources/Application/AppComponent+Notice.swift +++ b/Projects/App/Sources/Application/AppComponent+Notice.swift @@ -7,9 +7,9 @@ // import CommonFeature -import StorageFeature import NoticeDomain import NoticeDomainInterface +import StorageFeature public extension AppComponent { var noticePopupComponent: NoticePopupComponent { diff --git a/Projects/App/Sources/Application/AppComponent+Playlist.swift b/Projects/App/Sources/Application/AppComponent+Playlist.swift index bf5c9d071..09aff377d 100644 --- a/Projects/App/Sources/Application/AppComponent+Playlist.swift +++ b/Projects/App/Sources/Application/AppComponent+Playlist.swift @@ -7,15 +7,13 @@ // import CommonFeature -import DataModule -import DomainModule -import NetworkModule +import PlayListDomain +import PlayListDomainInterface import SearchFeature import StorageFeature // MARK: 변수명 주의 // AppComponent 내 변수 == Dependency 내 변수 이름 같아야함 -// public extension AppComponent { var beforeSearchComponent: BeforeSearchComponent { diff --git a/Projects/App/Sources/Application/AppComponent+Songs.swift b/Projects/App/Sources/Application/AppComponent+Songs.swift index 81ce0a9c8..951a6c7b5 100644 --- a/Projects/App/Sources/Application/AppComponent+Songs.swift +++ b/Projects/App/Sources/Application/AppComponent+Songs.swift @@ -7,11 +7,10 @@ // import CommonFeature -import DataModule -import DomainModule import HomeFeature -import NetworkModule import SearchFeature +import SongsDomain +import SongsDomainInterface public extension AppComponent { var searchComponent: SearchComponent { diff --git a/Projects/App/Sources/Application/AppComponent+User.swift b/Projects/App/Sources/Application/AppComponent+User.swift index 8144ce94e..2bef4783c 100644 --- a/Projects/App/Sources/Application/AppComponent+User.swift +++ b/Projects/App/Sources/Application/AppComponent+User.swift @@ -7,11 +7,10 @@ // import CommonFeature -import DataModule -import DomainModule -import NetworkModule import SignInFeature import StorageFeature +import UserDomain +import UserDomainInterface // MARK: 변수명 주의 // AppComponent 내 변수 == Dependency 내 변수 이름 같아야함 diff --git a/Projects/App/Sources/Application/NeedleGenerated.swift b/Projects/App/Sources/Application/NeedleGenerated.swift index 8a1b5aba1..c2e49bccd 100644 --- a/Projects/App/Sources/Application/NeedleGenerated.swift +++ b/Projects/App/Sources/Application/NeedleGenerated.swift @@ -29,6 +29,8 @@ import NetworkModule import NoticeDomain import NoticeDomainInterface import PanModal +import PlayListDomain +import PlayListDomainInterface import PlayerFeature import RootFeature import RxCocoa @@ -37,8 +39,12 @@ import RxSwift import SearchFeature import SignInFeature import SnapKit +import SongsDomain +import SongsDomainInterface import StorageFeature import UIKit +import UserDomain +import UserDomainInterface import Utility // swiftlint:disable unused_declaration diff --git a/Projects/Domains/BaseDomain/Sources/ResponseDTO/BaseResponseDTO.swift b/Projects/Domains/BaseDomain/Sources/ResponseDTO/BaseResponseDTO.swift index 61929bfdc..7f0536e1e 100644 --- a/Projects/Domains/BaseDomain/Sources/ResponseDTO/BaseResponseDTO.swift +++ b/Projects/Domains/BaseDomain/Sources/ResponseDTO/BaseResponseDTO.swift @@ -6,17 +6,15 @@ // Copyright © 2024 yongbeomkwak. All rights reserved. // +import BaseDomainInterface import Foundation public struct BaseResponseDTO: Codable { public let status: Int } -#warning("어떤 문제인지 기존 모듈과 충돌함") -/* - public extension BaseResponseDTO { - func toDomain() -> BaseEntity { - return BaseEntity(status: status) - } - } - */ +public extension BaseResponseDTO { + func toDomain() -> BaseEntity { + return BaseEntity(status: status) + } +} diff --git a/Projects/Domains/ChartDomain/Sources/DataSource/RemoteChartDataSourceImpl.swift b/Projects/Domains/ChartDomain/Sources/DataSource/RemoteChartDataSourceImpl.swift index a96e07e62..9b7f32431 100644 --- a/Projects/Domains/ChartDomain/Sources/DataSource/RemoteChartDataSourceImpl.swift +++ b/Projects/Domains/ChartDomain/Sources/DataSource/RemoteChartDataSourceImpl.swift @@ -1,7 +1,7 @@ -import Foundation -import RxSwift import BaseDomain import ChartDomainInterface +import Foundation +import RxSwift public final class RemoteChartDataSourceImpl: BaseRemoteDataSource, RemoteChartDataSource { public func fetchChartRanking(type: ChartDateType, limit: Int) -> Single<[ChartRankingEntity]> { diff --git a/Projects/Domains/ChartDomain/Sources/Repository/ChartRepositoryImpl.swift b/Projects/Domains/ChartDomain/Sources/Repository/ChartRepositoryImpl.swift index 5ab828c9e..d2a82a3e2 100644 --- a/Projects/Domains/ChartDomain/Sources/Repository/ChartRepositoryImpl.swift +++ b/Projects/Domains/ChartDomain/Sources/Repository/ChartRepositoryImpl.swift @@ -1,6 +1,6 @@ +import ChartDomainInterface import Foundation import RxSwift -import ChartDomainInterface public final class ChartRepositoryImpl: ChartRepository { private let remoteChartDataSource: any RemoteChartDataSource diff --git a/Projects/Domains/ChartDomain/Sources/ResponseDTO/FetchChartRankingResponseDTO.swift b/Projects/Domains/ChartDomain/Sources/ResponseDTO/FetchChartRankingResponseDTO.swift index f88d3ea9b..e0d7e9c56 100644 --- a/Projects/Domains/ChartDomain/Sources/ResponseDTO/FetchChartRankingResponseDTO.swift +++ b/Projects/Domains/ChartDomain/Sources/ResponseDTO/FetchChartRankingResponseDTO.swift @@ -1,5 +1,5 @@ -import Foundation import ChartDomainInterface +import Foundation import Utility public struct SingleChartRankingResponseDTO: Decodable, Equatable { diff --git a/Projects/Domains/ChartDomain/Sources/UseCase/FetchChartRankingUseCaseImpl.swift b/Projects/Domains/ChartDomain/Sources/UseCase/FetchChartRankingUseCaseImpl.swift index 49a4fb19d..330e77460 100644 --- a/Projects/Domains/ChartDomain/Sources/UseCase/FetchChartRankingUseCaseImpl.swift +++ b/Projects/Domains/ChartDomain/Sources/UseCase/FetchChartRankingUseCaseImpl.swift @@ -1,5 +1,5 @@ -import RxSwift import ChartDomainInterface +import RxSwift public struct FetchChartRankingUseCaseImpl: FetchChartRankingUseCase { private let chartRepository: any ChartRepository diff --git a/Projects/Domains/ChartDomain/Sources/UseCase/FetchChartUpdateTimeUseCaseImpl.swift b/Projects/Domains/ChartDomain/Sources/UseCase/FetchChartUpdateTimeUseCaseImpl.swift index f7ea8f2e1..3a6d6b676 100644 --- a/Projects/Domains/ChartDomain/Sources/UseCase/FetchChartUpdateTimeUseCaseImpl.swift +++ b/Projects/Domains/ChartDomain/Sources/UseCase/FetchChartUpdateTimeUseCaseImpl.swift @@ -1,5 +1,5 @@ -import RxSwift import ChartDomainInterface +import RxSwift public struct FetchChartUpdateTimeUseCaseImpl: FetchChartUpdateTimeUseCase { private let chartRepository: any ChartRepository diff --git a/Projects/Domains/FaqDomain/Sources/API/FaqAPI.swift b/Projects/Domains/FaqDomain/Sources/API/FaqAPI.swift index 35af607ef..4a4465416 100644 --- a/Projects/Domains/FaqDomain/Sources/API/FaqAPI.swift +++ b/Projects/Domains/FaqDomain/Sources/API/FaqAPI.swift @@ -1,8 +1,8 @@ +import BaseDomain import ErrorModule import Foundation import KeychainModule import Moya -import BaseDomain public enum FaqAPI { case fetchFaqCategories diff --git a/Projects/Domains/FaqDomain/Sources/DataSource/RemoteFaqDataSourceImpl.swift b/Projects/Domains/FaqDomain/Sources/DataSource/RemoteFaqDataSourceImpl.swift index c9efb1ebc..3978cd599 100644 --- a/Projects/Domains/FaqDomain/Sources/DataSource/RemoteFaqDataSourceImpl.swift +++ b/Projects/Domains/FaqDomain/Sources/DataSource/RemoteFaqDataSourceImpl.swift @@ -1,7 +1,7 @@ -import Foundation -import RxSwift import BaseDomain import FaqDomainInterface +import Foundation +import RxSwift public final class RemoteFaqDataSourceImpl: BaseRemoteDataSource, RemoteFaqDataSource { public func fetchCategories() -> Single { diff --git a/Projects/Domains/FaqDomain/Sources/ResponseDTO/FaqCategoryResponseDTO.swift b/Projects/Domains/FaqDomain/Sources/ResponseDTO/FaqCategoryResponseDTO.swift index 8d8248006..bedbe1c69 100644 --- a/Projects/Domains/FaqDomain/Sources/ResponseDTO/FaqCategoryResponseDTO.swift +++ b/Projects/Domains/FaqDomain/Sources/ResponseDTO/FaqCategoryResponseDTO.swift @@ -1,5 +1,5 @@ -import Foundation import FaqDomainInterface +import Foundation public struct FaqCategoryResponseDTO: Decodable, Equatable { public let categories: [String] diff --git a/Projects/Domains/FaqDomain/Sources/ResponseDTO/FaqResponseDTO.swift b/Projects/Domains/FaqDomain/Sources/ResponseDTO/FaqResponseDTO.swift index 0a3dd47f8..a31d97960 100644 --- a/Projects/Domains/FaqDomain/Sources/ResponseDTO/FaqResponseDTO.swift +++ b/Projects/Domains/FaqDomain/Sources/ResponseDTO/FaqResponseDTO.swift @@ -6,8 +6,8 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import Foundation import FaqDomainInterface +import Foundation public struct FaqResponseDTO: Decodable { public let question, description: String diff --git a/Projects/Domains/FaqDomain/Sources/UseCase/FetchFaqCategoriesUseCaseImpl.swift b/Projects/Domains/FaqDomain/Sources/UseCase/FetchFaqCategoriesUseCaseImpl.swift index 5cb244e15..48499863b 100644 --- a/Projects/Domains/FaqDomain/Sources/UseCase/FetchFaqCategoriesUseCaseImpl.swift +++ b/Projects/Domains/FaqDomain/Sources/UseCase/FetchFaqCategoriesUseCaseImpl.swift @@ -6,8 +6,8 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import Foundation import FaqDomainInterface +import Foundation import RxSwift public struct FetchFaqCategoriesUseCaseImpl: FetchFaqCategoriesUseCase { diff --git a/Projects/Domains/FaqDomain/Sources/UseCase/FetchFaqUseCaseImpl.swift b/Projects/Domains/FaqDomain/Sources/UseCase/FetchFaqUseCaseImpl.swift index 7c84ca276..82e2b8a5d 100644 --- a/Projects/Domains/FaqDomain/Sources/UseCase/FetchFaqUseCaseImpl.swift +++ b/Projects/Domains/FaqDomain/Sources/UseCase/FetchFaqUseCaseImpl.swift @@ -6,8 +6,8 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import Foundation import FaqDomainInterface +import Foundation import RxSwift public struct FetchFaqUseCaseImpl: FetchFaqUseCase { diff --git a/Projects/Domains/LikeDomain/Sources/API/LikeAPI.swift b/Projects/Domains/LikeDomain/Sources/API/LikeAPI.swift index 97ff55ff6..72b898ebe 100644 --- a/Projects/Domains/LikeDomain/Sources/API/LikeAPI.swift +++ b/Projects/Domains/LikeDomain/Sources/API/LikeAPI.swift @@ -1,8 +1,8 @@ +import BaseDomain import ErrorModule import Foundation import KeychainModule import Moya -import BaseDomain public enum LikeAPI { case fetchLikeNumOfSong(id: String) diff --git a/Projects/Domains/LikeDomain/Sources/DataSource/RemoteLikeDataSourceImpl.swift b/Projects/Domains/LikeDomain/Sources/DataSource/RemoteLikeDataSourceImpl.swift index 5d896f8b3..8e6883db8 100644 --- a/Projects/Domains/LikeDomain/Sources/DataSource/RemoteLikeDataSourceImpl.swift +++ b/Projects/Domains/LikeDomain/Sources/DataSource/RemoteLikeDataSourceImpl.swift @@ -1,7 +1,7 @@ -import Foundation -import RxSwift import BaseDomain +import Foundation import LikeDomainInterface +import RxSwift public final class RemoteLikeDataSourceImpl: BaseRemoteDataSource, RemoteLikeDataSource { public func fetchLikeNumOfSong(id: String) -> Single { diff --git a/Projects/Domains/LikeDomain/Sources/UseCase/AddLikeSongUseCaseImpl.swift b/Projects/Domains/LikeDomain/Sources/UseCase/AddLikeSongUseCaseImpl.swift index fd24759e1..26c09dd3b 100644 --- a/Projects/Domains/LikeDomain/Sources/UseCase/AddLikeSongUseCaseImpl.swift +++ b/Projects/Domains/LikeDomain/Sources/UseCase/AddLikeSongUseCaseImpl.swift @@ -7,8 +7,8 @@ // import Foundation -import RxSwift import LikeDomainInterface +import RxSwift public struct AddLikeSongUseCaseImpl: AddLikeSongUseCase { private let likeRepository: any LikeRepository diff --git a/Projects/Domains/LikeDomain/Sources/UseCase/CancelLikeSongUseCaseImpl.swift b/Projects/Domains/LikeDomain/Sources/UseCase/CancelLikeSongUseCaseImpl.swift index 70a324fea..9814beb49 100644 --- a/Projects/Domains/LikeDomain/Sources/UseCase/CancelLikeSongUseCaseImpl.swift +++ b/Projects/Domains/LikeDomain/Sources/UseCase/CancelLikeSongUseCaseImpl.swift @@ -6,8 +6,8 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import LikeDomainInterface import Foundation +import LikeDomainInterface import RxSwift public struct CancelLikeSongUseCaseImpl: CancelLikeSongUseCase { diff --git a/Projects/Domains/LikeDomain/Sources/UseCase/FetchLikeNumOfSongUseCaseImpl.swift b/Projects/Domains/LikeDomain/Sources/UseCase/FetchLikeNumOfSongUseCaseImpl.swift index 5f5a571f7..07e211e16 100644 --- a/Projects/Domains/LikeDomain/Sources/UseCase/FetchLikeNumOfSongUseCaseImpl.swift +++ b/Projects/Domains/LikeDomain/Sources/UseCase/FetchLikeNumOfSongUseCaseImpl.swift @@ -6,8 +6,8 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import LikeDomainInterface import Foundation +import LikeDomainInterface import RxSwift public struct FetchLikeNumOfSongUseCaseImpl: FetchLikeNumOfSongUseCase { diff --git a/Projects/Domains/NoticeDomain/Sources/API/NoticeAPI.swift b/Projects/Domains/NoticeDomain/Sources/API/NoticeAPI.swift index f04e35410..1ee90fddb 100644 --- a/Projects/Domains/NoticeDomain/Sources/API/NoticeAPI.swift +++ b/Projects/Domains/NoticeDomain/Sources/API/NoticeAPI.swift @@ -6,11 +6,11 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // +import BaseDomain +import ErrorModule import Foundation import Moya -import BaseDomain import NoticeDomainInterface -import ErrorModule public enum NoticeAPI { case fetchNotice(type: NoticeType) diff --git a/Projects/Domains/NoticeDomain/Sources/DataSource/RemoteNoticeDataSourceImpl.swift b/Projects/Domains/NoticeDomain/Sources/DataSource/RemoteNoticeDataSourceImpl.swift index 1c918f23d..0935d6b77 100644 --- a/Projects/Domains/NoticeDomain/Sources/DataSource/RemoteNoticeDataSourceImpl.swift +++ b/Projects/Domains/NoticeDomain/Sources/DataSource/RemoteNoticeDataSourceImpl.swift @@ -6,10 +6,10 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import Foundation -import RxSwift import BaseDomain +import Foundation import NoticeDomainInterface +import RxSwift public final class RemoteNoticeDataSourceImpl: BaseRemoteDataSource, RemoteNoticeDataSource { public func fetchNotice(type: NoticeType) -> Single<[FetchNoticeEntity]> { diff --git a/Projects/Domains/NoticeDomain/Sources/Repository/NoticeRepositoryImpl.swift b/Projects/Domains/NoticeDomain/Sources/Repository/NoticeRepositoryImpl.swift index 287cd1b1b..abf78d42a 100644 --- a/Projects/Domains/NoticeDomain/Sources/Repository/NoticeRepositoryImpl.swift +++ b/Projects/Domains/NoticeDomain/Sources/Repository/NoticeRepositoryImpl.swift @@ -7,8 +7,8 @@ // import Foundation -import RxSwift import NoticeDomainInterface +import RxSwift public final class NoticeRepositoryImpl: NoticeRepository { private let remoteNoticeDataSource: any RemoteNoticeDataSource diff --git a/Projects/Domains/NoticeDomain/Sources/UseCase/FetchNoticeCategoriesUseCaseImpl.swift b/Projects/Domains/NoticeDomain/Sources/UseCase/FetchNoticeCategoriesUseCaseImpl.swift index 2b43d988e..dc9d5d5bb 100644 --- a/Projects/Domains/NoticeDomain/Sources/UseCase/FetchNoticeCategoriesUseCaseImpl.swift +++ b/Projects/Domains/NoticeDomain/Sources/UseCase/FetchNoticeCategoriesUseCaseImpl.swift @@ -7,8 +7,8 @@ // import Foundation -import RxSwift import NoticeDomainInterface +import RxSwift public struct FetchNoticeCategoriesUseCaseImpl: FetchNoticeCategoriesUseCase { private let noticeRepository: any NoticeRepository diff --git a/Projects/Domains/NoticeDomain/Sources/UseCase/FetchNoticeUseCaseImpl.swift b/Projects/Domains/NoticeDomain/Sources/UseCase/FetchNoticeUseCaseImpl.swift index d8bd369a4..a94098f9b 100644 --- a/Projects/Domains/NoticeDomain/Sources/UseCase/FetchNoticeUseCaseImpl.swift +++ b/Projects/Domains/NoticeDomain/Sources/UseCase/FetchNoticeUseCaseImpl.swift @@ -7,8 +7,8 @@ // import Foundation -import RxSwift import NoticeDomainInterface +import RxSwift public struct FetchNoticeUseCaseImpl: FetchNoticeUseCase { private let noticeRepository: any NoticeRepository diff --git a/Projects/Services/NetworkModule/Sources/Playlist/Remote/RemotePlayListDataSource.swift b/Projects/Domains/PlayListDomain/Interface/DataSource/RemotePlayListDataSource.swift similarity index 84% rename from Projects/Services/NetworkModule/Sources/Playlist/Remote/RemotePlayListDataSource.swift rename to Projects/Domains/PlayListDomain/Interface/DataSource/RemotePlayListDataSource.swift index b0526b3cc..9a6dcdb71 100644 --- a/Projects/Services/NetworkModule/Sources/Playlist/Remote/RemotePlayListDataSource.swift +++ b/Projects/Domains/PlayListDomain/Interface/DataSource/RemotePlayListDataSource.swift @@ -1,6 +1,4 @@ -import DataMappingModule -import DomainModule -import ErrorModule +import BaseDomainInterface import Foundation import RxSwift @@ -10,7 +8,6 @@ public protocol RemotePlayListDataSource { func createPlayList(title: String) -> Single func editPlayList(key: String, songs: [String]) -> Single func editPlayListName(key: String, title: String) -> Single - func deletePlayList(key: String) -> Single func loadPlayList(key: String) -> Single func addSongIntoPlayList(key: String, songs: [String]) -> Single func removeSongs(key: String, songs: [String]) -> Single diff --git a/Projects/Services/DomainModule/Sources/Playlist/Entity/AddSongEntity.swift b/Projects/Domains/PlayListDomain/Interface/Entity/AddSongEntity.swift similarity index 100% rename from Projects/Services/DomainModule/Sources/Playlist/Entity/AddSongEntity.swift rename to Projects/Domains/PlayListDomain/Interface/Entity/AddSongEntity.swift diff --git a/Projects/Services/DomainModule/Sources/Playlist/Entity/EditPlayListNameEntity.swift b/Projects/Domains/PlayListDomain/Interface/Entity/EditPlayListNameEntity.swift similarity index 100% rename from Projects/Services/DomainModule/Sources/Playlist/Entity/EditPlayListNameEntity.swift rename to Projects/Domains/PlayListDomain/Interface/Entity/EditPlayListNameEntity.swift diff --git a/Projects/Services/DomainModule/Sources/Playlist/Entity/PlayListBaseEntity.swift b/Projects/Domains/PlayListDomain/Interface/Entity/PlayListBaseEntity.swift similarity index 100% rename from Projects/Services/DomainModule/Sources/Playlist/Entity/PlayListBaseEntity.swift rename to Projects/Domains/PlayListDomain/Interface/Entity/PlayListBaseEntity.swift diff --git a/Projects/Services/DomainModule/Sources/Playlist/Entity/PlayListDetailEntity.swift b/Projects/Domains/PlayListDomain/Interface/Entity/PlayListDetailEntity.swift similarity index 96% rename from Projects/Services/DomainModule/Sources/Playlist/Entity/PlayListDetailEntity.swift rename to Projects/Domains/PlayListDomain/Interface/Entity/PlayListDetailEntity.swift index d84614d56..bf35fc443 100644 --- a/Projects/Services/DomainModule/Sources/Playlist/Entity/PlayListDetailEntity.swift +++ b/Projects/Domains/PlayListDomain/Interface/Entity/PlayListDetailEntity.swift @@ -7,6 +7,7 @@ // import Foundation +import SongsDomainInterface public struct PlayListDetailEntity: Equatable { public init( diff --git a/Projects/Services/DomainModule/Sources/Playlist/Entity/RecommendPlayListEntity.swift b/Projects/Domains/PlayListDomain/Interface/Entity/RecommendPlayListEntity.swift similarity index 100% rename from Projects/Services/DomainModule/Sources/Playlist/Entity/RecommendPlayListEntity.swift rename to Projects/Domains/PlayListDomain/Interface/Entity/RecommendPlayListEntity.swift diff --git a/Projects/Services/DataMappingModule/Sources/Base/PlayListType.swift b/Projects/Domains/PlayListDomain/Interface/Enum/PlayListType.swift similarity index 100% rename from Projects/Services/DataMappingModule/Sources/Base/PlayListType.swift rename to Projects/Domains/PlayListDomain/Interface/Enum/PlayListType.swift diff --git a/Projects/Services/DomainModule/Sources/Playlist/Repository/PlayListRepository.swift b/Projects/Domains/PlayListDomain/Interface/Repository/PlayListRepository.swift similarity index 87% rename from Projects/Services/DomainModule/Sources/Playlist/Repository/PlayListRepository.swift rename to Projects/Domains/PlayListDomain/Interface/Repository/PlayListRepository.swift index 358e858ca..902aa39c3 100644 --- a/Projects/Services/DomainModule/Sources/Playlist/Repository/PlayListRepository.swift +++ b/Projects/Domains/PlayListDomain/Interface/Repository/PlayListRepository.swift @@ -1,5 +1,4 @@ -import DataMappingModule -import ErrorModule +import BaseDomainInterface import Foundation import RxSwift @@ -9,7 +8,6 @@ public protocol PlayListRepository { func createPlayList(title: String) -> Single func editPlayList(key: String, songs: [String]) -> Single func editPlayListName(key: String, title: String) -> Single - func deletePlayList(key: String) -> Single func loadPlayList(key: String) -> Single func addSongIntoPlayList(key: String, songs: [String]) -> Single func removeSongs(key: String, songs: [String]) -> Single diff --git a/Projects/Services/DomainModule/Sources/Playlist/UseCases/AddSongIntoPlayListUseCase.swift b/Projects/Domains/PlayListDomain/Interface/UseCase/AddSongIntoPlayListUseCase.swift similarity index 85% rename from Projects/Services/DomainModule/Sources/Playlist/UseCases/AddSongIntoPlayListUseCase.swift rename to Projects/Domains/PlayListDomain/Interface/UseCase/AddSongIntoPlayListUseCase.swift index 6bfbd452c..a813bb227 100644 --- a/Projects/Services/DomainModule/Sources/Playlist/UseCases/AddSongIntoPlayListUseCase.swift +++ b/Projects/Domains/PlayListDomain/Interface/UseCase/AddSongIntoPlayListUseCase.swift @@ -1,4 +1,3 @@ -import DataMappingModule import Foundation import RxSwift diff --git a/Projects/Services/DomainModule/Sources/Playlist/UseCases/CreatePlayListUseCase.swift b/Projects/Domains/PlayListDomain/Interface/UseCase/CreatePlayListUseCase.swift similarity index 84% rename from Projects/Services/DomainModule/Sources/Playlist/UseCases/CreatePlayListUseCase.swift rename to Projects/Domains/PlayListDomain/Interface/UseCase/CreatePlayListUseCase.swift index 9ad11c60b..5be4f3988 100644 --- a/Projects/Services/DomainModule/Sources/Playlist/UseCases/CreatePlayListUseCase.swift +++ b/Projects/Domains/PlayListDomain/Interface/UseCase/CreatePlayListUseCase.swift @@ -1,4 +1,3 @@ -import DataMappingModule import Foundation import RxSwift diff --git a/Projects/Services/DomainModule/Sources/Playlist/UseCases/EditPlayListNameUseCase.swift b/Projects/Domains/PlayListDomain/Interface/UseCase/EditPlayListNameUseCase.swift similarity index 86% rename from Projects/Services/DomainModule/Sources/Playlist/UseCases/EditPlayListNameUseCase.swift rename to Projects/Domains/PlayListDomain/Interface/UseCase/EditPlayListNameUseCase.swift index 585b6b9a0..06dab8ac0 100644 --- a/Projects/Services/DomainModule/Sources/Playlist/UseCases/EditPlayListNameUseCase.swift +++ b/Projects/Domains/PlayListDomain/Interface/UseCase/EditPlayListNameUseCase.swift @@ -1,4 +1,3 @@ -import DataMappingModule import Foundation import RxSwift diff --git a/Projects/Services/DomainModule/Sources/Playlist/UseCases/EditPlayListUseCase.swift b/Projects/Domains/PlayListDomain/Interface/UseCase/EditPlayListUseCase.swift similarity index 84% rename from Projects/Services/DomainModule/Sources/Playlist/UseCases/EditPlayListUseCase.swift rename to Projects/Domains/PlayListDomain/Interface/UseCase/EditPlayListUseCase.swift index b32ba92f3..a231a1831 100644 --- a/Projects/Services/DomainModule/Sources/Playlist/UseCases/EditPlayListUseCase.swift +++ b/Projects/Domains/PlayListDomain/Interface/UseCase/EditPlayListUseCase.swift @@ -1,4 +1,4 @@ -import DataMappingModule +import BaseDomainInterface import Foundation import RxSwift diff --git a/Projects/Services/DomainModule/Sources/Playlist/UseCases/FetchPlayListDetailUseCase.swift b/Projects/Domains/PlayListDomain/Interface/UseCase/FetchPlayListDetailUseCase.swift similarity index 86% rename from Projects/Services/DomainModule/Sources/Playlist/UseCases/FetchPlayListDetailUseCase.swift rename to Projects/Domains/PlayListDomain/Interface/UseCase/FetchPlayListDetailUseCase.swift index 15ff24102..2b687a1e2 100644 --- a/Projects/Services/DomainModule/Sources/Playlist/UseCases/FetchPlayListDetailUseCase.swift +++ b/Projects/Domains/PlayListDomain/Interface/UseCase/FetchPlayListDetailUseCase.swift @@ -1,4 +1,3 @@ -import DataMappingModule import Foundation import RxSwift diff --git a/Projects/Services/DomainModule/Sources/Playlist/UseCases/FetchRecommendPlayListUseCase.swift b/Projects/Domains/PlayListDomain/Interface/UseCase/FetchRecommendPlayListUseCase.swift similarity index 84% rename from Projects/Services/DomainModule/Sources/Playlist/UseCases/FetchRecommendPlayListUseCase.swift rename to Projects/Domains/PlayListDomain/Interface/UseCase/FetchRecommendPlayListUseCase.swift index d672c37ab..68e1e55d2 100644 --- a/Projects/Services/DomainModule/Sources/Playlist/UseCases/FetchRecommendPlayListUseCase.swift +++ b/Projects/Domains/PlayListDomain/Interface/UseCase/FetchRecommendPlayListUseCase.swift @@ -1,4 +1,3 @@ -import DataMappingModule import Foundation import RxSwift diff --git a/Projects/Services/DomainModule/Sources/Playlist/UseCases/LoadPlayListUseCase.swift b/Projects/Domains/PlayListDomain/Interface/UseCase/LoadPlayListUseCase.swift similarity index 84% rename from Projects/Services/DomainModule/Sources/Playlist/UseCases/LoadPlayListUseCase.swift rename to Projects/Domains/PlayListDomain/Interface/UseCase/LoadPlayListUseCase.swift index b83a43922..d1db625cf 100644 --- a/Projects/Services/DomainModule/Sources/Playlist/UseCases/LoadPlayListUseCase.swift +++ b/Projects/Domains/PlayListDomain/Interface/UseCase/LoadPlayListUseCase.swift @@ -1,4 +1,3 @@ -import DataMappingModule import Foundation import RxSwift diff --git a/Projects/Services/DomainModule/Sources/Playlist/UseCases/RemoveSongsUseCase.swift b/Projects/Domains/PlayListDomain/Interface/UseCase/RemoveSongsUseCase.swift similarity index 84% rename from Projects/Services/DomainModule/Sources/Playlist/UseCases/RemoveSongsUseCase.swift rename to Projects/Domains/PlayListDomain/Interface/UseCase/RemoveSongsUseCase.swift index 7fd874042..b3b229823 100644 --- a/Projects/Services/DomainModule/Sources/Playlist/UseCases/RemoveSongsUseCase.swift +++ b/Projects/Domains/PlayListDomain/Interface/UseCase/RemoveSongsUseCase.swift @@ -1,4 +1,4 @@ -import DataMappingModule +import BaseDomainInterface import Foundation import RxSwift diff --git a/Projects/Domains/PlayListDomain/Project.swift b/Projects/Domains/PlayListDomain/Project.swift new file mode 100644 index 000000000..7a4c3fb84 --- /dev/null +++ b/Projects/Domains/PlayListDomain/Project.swift @@ -0,0 +1,22 @@ +import DependencyPlugin +import ProjectDescription +import ProjectDescriptionHelpers + +let project = Project.module( + name: ModulePaths.Domain.PlayListDomain.rawValue, + targets: [ + .interface(module: .domain(.PlayListDomain)), + .implements( + module: .domain(.PlayListDomain), + dependencies: [ + .domain(target: .BaseDomain), + .domain(target: .SongsDomain), + .domain(target: .PlayListDomain, type: .interface) + ] + ), + .tests( + module: .domain(.PlayListDomain), + dependencies: [.domain(target: .PlayListDomain)] + ) + ] +) diff --git a/Projects/Services/APIKit/Sources/API/PlayListAPI.swift b/Projects/Domains/PlayListDomain/Sources/API/PlayListAPI.swift similarity index 90% rename from Projects/Services/APIKit/Sources/API/PlayListAPI.swift rename to Projects/Domains/PlayListDomain/Sources/API/PlayListAPI.swift index 98ee0c783..b8a375fdb 100644 --- a/Projects/Services/APIKit/Sources/API/PlayListAPI.swift +++ b/Projects/Domains/PlayListDomain/Sources/API/PlayListAPI.swift @@ -1,8 +1,9 @@ -import DataMappingModule +import BaseDomain import ErrorModule import Foundation import KeychainModule import Moya +import PlayListDomainInterface public struct AddSongRequest: Encodable { var songIds: [String] @@ -27,7 +28,6 @@ public enum PlayListAPI { case createPlayList(title: String) case editPlayList(key: String, songs: [String]) case editPlayListName(key: String, title: String) - case deletePlayList(key: String) case removeSongs(key: String, songs: [String]) case loadPlayList(key: String) case addSongIntoPlayList(key: String, songs: [String]) @@ -54,9 +54,6 @@ extension PlayListAPI: WMAPI { case .createPlayList: return "/create" - case let .deletePlayList(key: key): - return "/\(key)" - case .loadPlayList: return "/copy" @@ -84,9 +81,6 @@ extension PlayListAPI: WMAPI { case .editPlayList, .editPlayListName: return .patch - - case .deletePlayList: - return .delete } } @@ -95,7 +89,7 @@ extension PlayListAPI: WMAPI { case .fetchRecommendPlayList: return .requestPlain - case .fetchPlayListDetail, .deletePlayList: + case .fetchPlayListDetail: return .requestPlain case let .loadPlayList(key): @@ -123,7 +117,7 @@ extension PlayListAPI: WMAPI { case .fetchRecommendPlayList, .fetchPlayListDetail: return .none - case .createPlayList, .editPlayList, .deletePlayList, .loadPlayList, .editPlayListName, .addSongIntoPlayList, + case .createPlayList, .editPlayList, .loadPlayList, .editPlayListName, .addSongIntoPlayList, .removeSongs: return .accessToken } diff --git a/Projects/Services/NetworkModule/Sources/Playlist/Remote/RemotePlayListDataSourceImpl.swift b/Projects/Domains/PlayListDomain/Sources/DataSource/RemotePlayListDataSourceImpl.swift similarity index 88% rename from Projects/Services/NetworkModule/Sources/Playlist/Remote/RemotePlayListDataSourceImpl.swift rename to Projects/Domains/PlayListDomain/Sources/DataSource/RemotePlayListDataSourceImpl.swift index b39ba1e5f..9101d40a8 100644 --- a/Projects/Services/NetworkModule/Sources/Playlist/Remote/RemotePlayListDataSourceImpl.swift +++ b/Projects/Domains/PlayListDomain/Sources/DataSource/RemotePlayListDataSourceImpl.swift @@ -1,8 +1,7 @@ -import APIKit -import DataMappingModule -import DomainModule -import ErrorModule +import BaseDomain +import BaseDomainInterface import Foundation +import PlayListDomainInterface import RxSwift public final class RemotePlayListDataSourceImpl: BaseRemoteDataSource, RemotePlayListDataSource { @@ -36,12 +35,6 @@ public final class RemotePlayListDataSourceImpl: BaseRemoteDataSource Single { - request(.deletePlayList(key: key)) - .map(BaseResponseDTO.self) - .map { $0.toDomain() } - } - public func loadPlayList(key: String) -> Single { request(.loadPlayList(key: key)) .map(PlayListBaseResponseDTO.self) diff --git a/Projects/Services/DataModule/Sources/Playlist/Repositories/PlaylistRepositoryImpl.swift b/Projects/Domains/PlayListDomain/Sources/Repository/PlaylistRepositoryImpl.swift similarity index 83% rename from Projects/Services/DataModule/Sources/Playlist/Repositories/PlaylistRepositoryImpl.swift rename to Projects/Domains/PlayListDomain/Sources/Repository/PlaylistRepositoryImpl.swift index 9d29de2c1..2a87d5932 100644 --- a/Projects/Services/DataModule/Sources/Playlist/Repositories/PlaylistRepositoryImpl.swift +++ b/Projects/Domains/PlayListDomain/Sources/Repository/PlaylistRepositoryImpl.swift @@ -6,14 +6,11 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DatabaseModule -import DataMappingModule -import DomainModule -import ErrorModule -import NetworkModule +import BaseDomainInterface +import PlayListDomainInterface import RxSwift -public struct PlayListRepositoryImpl: PlayListRepository { +public final class PlayListRepositoryImpl: PlayListRepository { private let remotePlayListDataSource: any RemotePlayListDataSource public init( @@ -42,10 +39,6 @@ public struct PlayListRepositoryImpl: PlayListRepository { remotePlayListDataSource.editPlayListName(key: key, title: title) } - public func deletePlayList(key: String) -> Single { - remotePlayListDataSource.deletePlayList(key: key) - } - public func loadPlayList(key: String) -> Single { remotePlayListDataSource.loadPlayList(key: key) } @@ -54,7 +47,7 @@ public struct PlayListRepositoryImpl: PlayListRepository { remotePlayListDataSource.addSongIntoPlayList(key: key, songs: songs) } - public func removeSongs(key: String, songs: [String]) -> RxSwift.Single { + public func removeSongs(key: String, songs: [String]) -> RxSwift.Single { remotePlayListDataSource.removeSongs(key: key, songs: songs) } } diff --git a/Projects/Services/NetworkModule/Sources/Playlist/DataTransfer/AddSongTransfer.swift b/Projects/Domains/PlayListDomain/Sources/ResponseDTO/AddSongResponseDTO.swift similarity index 57% rename from Projects/Services/NetworkModule/Sources/Playlist/DataTransfer/AddSongTransfer.swift rename to Projects/Domains/PlayListDomain/Sources/ResponseDTO/AddSongResponseDTO.swift index cf41e189c..6c04fde57 100644 --- a/Projects/Services/NetworkModule/Sources/Playlist/DataTransfer/AddSongTransfer.swift +++ b/Projects/Domains/PlayListDomain/Sources/ResponseDTO/AddSongResponseDTO.swift @@ -1,6 +1,11 @@ -import DataMappingModule -import DomainModule -import Utility +import Foundation +import PlayListDomainInterface + +public struct AddSongResponseDTO: Decodable { + public let status: Int + public let addedSongsLength: Int + public let duplicated: Bool +} public extension AddSongResponseDTO { func toDomain() -> AddSongEntity { diff --git a/Projects/Services/DataMappingModule/Sources/Playlist/Response/EditPlayListNameResponseDTO.swift b/Projects/Domains/PlayListDomain/Sources/ResponseDTO/EditPlayListNameResponseDTO.swift similarity index 57% rename from Projects/Services/DataMappingModule/Sources/Playlist/Response/EditPlayListNameResponseDTO.swift rename to Projects/Domains/PlayListDomain/Sources/ResponseDTO/EditPlayListNameResponseDTO.swift index b811123e3..5de503e17 100644 --- a/Projects/Services/DataMappingModule/Sources/Playlist/Response/EditPlayListNameResponseDTO.swift +++ b/Projects/Domains/PlayListDomain/Sources/ResponseDTO/EditPlayListNameResponseDTO.swift @@ -7,7 +7,14 @@ // import Foundation +import PlayListDomainInterface public struct EditPlayListNameResponseDTO: Decodable { public let status: Int } + +public extension EditPlayListNameResponseDTO { + func toDomain(title: String) -> EditPlayListNameEntity { + EditPlayListNameEntity(title: title, status: status) + } +} diff --git a/Projects/Services/DataMappingModule/Sources/Playlist/Response/PlayListBaseResponseDTO.swift b/Projects/Domains/PlayListDomain/Sources/ResponseDTO/PlayListBaseResponseDTO.swift similarity index 62% rename from Projects/Services/DataMappingModule/Sources/Playlist/Response/PlayListBaseResponseDTO.swift rename to Projects/Domains/PlayListDomain/Sources/ResponseDTO/PlayListBaseResponseDTO.swift index c20d8d794..201d25932 100644 --- a/Projects/Services/DataMappingModule/Sources/Playlist/Response/PlayListBaseResponseDTO.swift +++ b/Projects/Domains/PlayListDomain/Sources/ResponseDTO/PlayListBaseResponseDTO.swift @@ -7,8 +7,15 @@ // import Foundation +import PlayListDomainInterface public struct PlayListBaseResponseDTO: Decodable { public let key: String public let status: Int } + +public extension PlayListBaseResponseDTO { + func toDomain() -> PlayListBaseEntity { + PlayListBaseEntity(status: status, key: key) + } +} diff --git a/Projects/Domains/PlayListDomain/Sources/ResponseDTO/PlayListDetailResponseDTO.swift b/Projects/Domains/PlayListDomain/Sources/ResponseDTO/PlayListDetailResponseDTO.swift new file mode 100644 index 000000000..b2f66866e --- /dev/null +++ b/Projects/Domains/PlayListDomain/Sources/ResponseDTO/PlayListDetailResponseDTO.swift @@ -0,0 +1,54 @@ +// +// RecommendPlayListResponseDTO.swift +// DataMappingModuleTests +// +// Created by yongbeomkwak on 2023/02/10. +// Copyright © 2023 yongbeomkwak. All rights reserved. +// + +import Foundation +import PlayListDomainInterface +import SongsDomain +import SongsDomainInterface +import Utility + +public struct SinglePlayListDetailResponseDTO: Decodable { + public let key: String? + public let title: String + public let songs: [SingleSongResponseDTO]? + public let image: SinglePlayListDetailResponseDTO.Image +} + +public extension SinglePlayListDetailResponseDTO { + struct Image: Decodable { + public let round: Int? + public let square: Int? + public let name: String? + public let version: Int? + } +} + +public extension SinglePlayListDetailResponseDTO { + func toDomain() -> PlayListDetailEntity { + PlayListDetailEntity( + key: key ?? "", + title: title, + songs: (songs ?? []).map { dto in + return SongEntity( + id: dto.id, + title: dto.title, + artist: dto.artist, + remix: dto.remix, + reaction: dto.reaction, + views: dto.total?.views ?? 0, + last: dto.total?.last ?? 0, + date: dto.date.changeDateFormat(origin: "yyMMdd", result: "yyyy.MM.dd") + ) + }, + image: image.name ?? "", + image_square_version: image.square ?? 0, + image_round_version: image.round ?? 0, + version: image.version ?? 0 + ) + } +} diff --git a/Projects/Services/DataMappingModule/Sources/Playlist/Response/RecommendPlayListResponseDTO.swift b/Projects/Domains/PlayListDomain/Sources/ResponseDTO/RecommendPlayListResponseDTO.swift similarity index 60% rename from Projects/Services/DataMappingModule/Sources/Playlist/Response/RecommendPlayListResponseDTO.swift rename to Projects/Domains/PlayListDomain/Sources/ResponseDTO/RecommendPlayListResponseDTO.swift index 6d2dc220b..4825fe86d 100644 --- a/Projects/Services/DataMappingModule/Sources/Playlist/Response/RecommendPlayListResponseDTO.swift +++ b/Projects/Domains/PlayListDomain/Sources/ResponseDTO/RecommendPlayListResponseDTO.swift @@ -7,6 +7,7 @@ // import Foundation +import PlayListDomainInterface public struct SingleRecommendPlayListResponseDTO: Decodable { public let key, title: String @@ -19,3 +20,14 @@ public extension SingleRecommendPlayListResponseDTO { public let square: Int } } + +public extension SingleRecommendPlayListResponseDTO { + func toDomain() -> RecommendPlayListEntity { + RecommendPlayListEntity( + key: key, + title: title, + image_round_version: image.round, + image_sqaure_version: image.square + ) + } +} diff --git a/Projects/Services/DataModule/Sources/Playlist/UseCases/AddSongIntoPlayListUseCaseImpl.swift b/Projects/Domains/PlayListDomain/Sources/UseCase/AddSongIntoPlayListUseCaseImpl.swift similarity index 90% rename from Projects/Services/DataModule/Sources/Playlist/UseCases/AddSongIntoPlayListUseCaseImpl.swift rename to Projects/Domains/PlayListDomain/Sources/UseCase/AddSongIntoPlayListUseCaseImpl.swift index 5b7952553..f08bf5e7e 100644 --- a/Projects/Services/DataModule/Sources/Playlist/UseCases/AddSongIntoPlayListUseCaseImpl.swift +++ b/Projects/Domains/PlayListDomain/Sources/UseCase/AddSongIntoPlayListUseCaseImpl.swift @@ -6,10 +6,8 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule -import DomainModule -import ErrorModule import Foundation +import PlayListDomainInterface import RxSwift public struct AddSongIntoPlayListUseCaseImpl: AddSongIntoPlayListUseCase { diff --git a/Projects/Services/DataModule/Sources/Playlist/UseCases/CreatePlayListUseCaseImpl.swift b/Projects/Domains/PlayListDomain/Sources/UseCase/CreatePlayListUseCaseImpl.swift similarity index 90% rename from Projects/Services/DataModule/Sources/Playlist/UseCases/CreatePlayListUseCaseImpl.swift rename to Projects/Domains/PlayListDomain/Sources/UseCase/CreatePlayListUseCaseImpl.swift index a3e3bac19..4bcafe8fe 100644 --- a/Projects/Services/DataModule/Sources/Playlist/UseCases/CreatePlayListUseCaseImpl.swift +++ b/Projects/Domains/PlayListDomain/Sources/UseCase/CreatePlayListUseCaseImpl.swift @@ -6,10 +6,8 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule -import DomainModule -import ErrorModule import Foundation +import PlayListDomainInterface import RxSwift public struct CreatePlayListUseCaseImpl: CreatePlayListUseCase { diff --git a/Projects/Services/DataModule/Sources/Playlist/UseCases/EditPlayListNameUseCaseImpl.swift b/Projects/Domains/PlayListDomain/Sources/UseCase/EditPlayListNameUseCaseImpl.swift similarity index 90% rename from Projects/Services/DataModule/Sources/Playlist/UseCases/EditPlayListNameUseCaseImpl.swift rename to Projects/Domains/PlayListDomain/Sources/UseCase/EditPlayListNameUseCaseImpl.swift index f8ab8fdcc..9fe9370f4 100644 --- a/Projects/Services/DataModule/Sources/Playlist/UseCases/EditPlayListNameUseCaseImpl.swift +++ b/Projects/Domains/PlayListDomain/Sources/UseCase/EditPlayListNameUseCaseImpl.swift @@ -6,10 +6,8 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule -import DomainModule -import ErrorModule import Foundation +import PlayListDomainInterface import RxSwift public struct EditPlayListNameUseCaseImpl: EditPlayListNameUseCase { diff --git a/Projects/Services/DataModule/Sources/Playlist/UseCases/EditPlayListUseCaseImpl.swift b/Projects/Domains/PlayListDomain/Sources/UseCase/EditPlayListUseCaseImpl.swift similarity index 90% rename from Projects/Services/DataModule/Sources/Playlist/UseCases/EditPlayListUseCaseImpl.swift rename to Projects/Domains/PlayListDomain/Sources/UseCase/EditPlayListUseCaseImpl.swift index 861f02c55..5917d2be3 100644 --- a/Projects/Services/DataModule/Sources/Playlist/UseCases/EditPlayListUseCaseImpl.swift +++ b/Projects/Domains/PlayListDomain/Sources/UseCase/EditPlayListUseCaseImpl.swift @@ -6,10 +6,9 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule -import DomainModule -import ErrorModule +import BaseDomainInterface import Foundation +import PlayListDomainInterface import RxSwift public struct EditPlayListUseCaseImpl: EditPlayListUseCase { diff --git a/Projects/Services/DataModule/Sources/Playlist/UseCases/FetchPlayListDetailUseCaseImpl.swift b/Projects/Domains/PlayListDomain/Sources/UseCase/FetchPlayListDetailUseCaseImpl.swift similarity index 90% rename from Projects/Services/DataModule/Sources/Playlist/UseCases/FetchPlayListDetailUseCaseImpl.swift rename to Projects/Domains/PlayListDomain/Sources/UseCase/FetchPlayListDetailUseCaseImpl.swift index 086345178..75284a010 100644 --- a/Projects/Services/DataModule/Sources/Playlist/UseCases/FetchPlayListDetailUseCaseImpl.swift +++ b/Projects/Domains/PlayListDomain/Sources/UseCase/FetchPlayListDetailUseCaseImpl.swift @@ -6,10 +6,8 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule -import DomainModule -import ErrorModule import Foundation +import PlayListDomainInterface import RxSwift public struct FetchPlayListDetailUseCaseImpl: FetchPlayListDetailUseCase { diff --git a/Projects/Services/DataModule/Sources/Playlist/UseCases/FetchRecommendPlayListUseCaseImpl.swift b/Projects/Domains/PlayListDomain/Sources/UseCase/FetchRecommendPlayListUseCaseImpl.swift similarity index 90% rename from Projects/Services/DataModule/Sources/Playlist/UseCases/FetchRecommendPlayListUseCaseImpl.swift rename to Projects/Domains/PlayListDomain/Sources/UseCase/FetchRecommendPlayListUseCaseImpl.swift index 609540f91..0c9faa929 100644 --- a/Projects/Services/DataModule/Sources/Playlist/UseCases/FetchRecommendPlayListUseCaseImpl.swift +++ b/Projects/Domains/PlayListDomain/Sources/UseCase/FetchRecommendPlayListUseCaseImpl.swift @@ -6,10 +6,8 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule -import DomainModule -import ErrorModule import Foundation +import PlayListDomainInterface import RxSwift public struct FetchRecommendPlayListUseCaseImpl: FetchRecommendPlayListUseCase { diff --git a/Projects/Services/DataModule/Sources/Playlist/UseCases/LoadPlayListUseCaseImpl.swift b/Projects/Domains/PlayListDomain/Sources/UseCase/LoadPlayListUseCaseImpl.swift similarity index 89% rename from Projects/Services/DataModule/Sources/Playlist/UseCases/LoadPlayListUseCaseImpl.swift rename to Projects/Domains/PlayListDomain/Sources/UseCase/LoadPlayListUseCaseImpl.swift index 5cdf8b426..553e06809 100644 --- a/Projects/Services/DataModule/Sources/Playlist/UseCases/LoadPlayListUseCaseImpl.swift +++ b/Projects/Domains/PlayListDomain/Sources/UseCase/LoadPlayListUseCaseImpl.swift @@ -6,10 +6,8 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule -import DomainModule -import ErrorModule import Foundation +import PlayListDomainInterface import RxSwift public struct LoadPlayListUseCaseImpl: LoadPlayListUseCase { diff --git a/Projects/Services/DataModule/Sources/Playlist/UseCases/RemoveSongsUseCaseImpl.swift b/Projects/Domains/PlayListDomain/Sources/UseCase/RemoveSongsUseCaseImpl.swift similarity index 90% rename from Projects/Services/DataModule/Sources/Playlist/UseCases/RemoveSongsUseCaseImpl.swift rename to Projects/Domains/PlayListDomain/Sources/UseCase/RemoveSongsUseCaseImpl.swift index b96384a85..5413fc61e 100644 --- a/Projects/Services/DataModule/Sources/Playlist/UseCases/RemoveSongsUseCaseImpl.swift +++ b/Projects/Domains/PlayListDomain/Sources/UseCase/RemoveSongsUseCaseImpl.swift @@ -6,10 +6,9 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule -import DomainModule -import ErrorModule +import BaseDomainInterface import Foundation +import PlayListDomainInterface import RxSwift public struct RemoveSongsUseCaseImpl: RemoveSongsUseCase { diff --git a/Projects/Domains/PlayListDomain/Tests/PlayListDomainTest.swift b/Projects/Domains/PlayListDomain/Tests/PlayListDomainTest.swift new file mode 100644 index 000000000..4d2a70eb8 --- /dev/null +++ b/Projects/Domains/PlayListDomain/Tests/PlayListDomainTest.swift @@ -0,0 +1,11 @@ +import XCTest + +final class PlayListDomainTests: XCTestCase { + override func setUpWithError() throws {} + + override func tearDownWithError() throws {} + + func testExample() { + XCTAssertEqual(1, 1) + } +} diff --git a/Projects/Services/NetworkModule/Sources/Songs/Remote/RemoteSongsDataSource.swift b/Projects/Domains/SongsDomain/Interface/DataSource/RemoteSongsDataSource.swift similarity index 82% rename from Projects/Services/NetworkModule/Sources/Songs/Remote/RemoteSongsDataSource.swift rename to Projects/Domains/SongsDomain/Interface/DataSource/RemoteSongsDataSource.swift index 3cba001fe..0d7cd1f38 100644 --- a/Projects/Services/NetworkModule/Sources/Songs/Remote/RemoteSongsDataSource.swift +++ b/Projects/Domains/SongsDomain/Interface/DataSource/RemoteSongsDataSource.swift @@ -1,6 +1,3 @@ -import DataMappingModule -import DomainModule -import ErrorModule import Foundation import RxSwift diff --git a/Projects/Services/DomainModule/Sources/Songs/Entity/LyricsEntity.swift b/Projects/Domains/SongsDomain/Interface/Entity/LyricsEntity.swift similarity index 100% rename from Projects/Services/DomainModule/Sources/Songs/Entity/LyricsEntity.swift rename to Projects/Domains/SongsDomain/Interface/Entity/LyricsEntity.swift diff --git a/Projects/Services/DomainModule/Sources/Songs/Entity/NewSongsEntity.swift b/Projects/Domains/SongsDomain/Interface/Entity/NewSongsEntity.swift similarity index 100% rename from Projects/Services/DomainModule/Sources/Songs/Entity/NewSongsEntity.swift rename to Projects/Domains/SongsDomain/Interface/Entity/NewSongsEntity.swift diff --git a/Projects/Services/DomainModule/Sources/Songs/Entity/SearchResultEntity.swift b/Projects/Domains/SongsDomain/Interface/Entity/SearchResultEntity.swift similarity index 100% rename from Projects/Services/DomainModule/Sources/Songs/Entity/SearchResultEntity.swift rename to Projects/Domains/SongsDomain/Interface/Entity/SearchResultEntity.swift diff --git a/Projects/Services/DomainModule/Sources/Songs/Entity/SongEntity.swift b/Projects/Domains/SongsDomain/Interface/Entity/SongEntity.swift similarity index 100% rename from Projects/Services/DomainModule/Sources/Songs/Entity/SongEntity.swift rename to Projects/Domains/SongsDomain/Interface/Entity/SongEntity.swift diff --git a/Projects/Services/DataMappingModule/Sources/Base/NewSongGroupType.swift b/Projects/Domains/SongsDomain/Interface/Enum/NewSongGroupType.swift similarity index 100% rename from Projects/Services/DataMappingModule/Sources/Base/NewSongGroupType.swift rename to Projects/Domains/SongsDomain/Interface/Enum/NewSongGroupType.swift diff --git a/Projects/Services/DomainModule/Sources/Songs/Repository/SongsRepository.swift b/Projects/Domains/SongsDomain/Interface/Repository/SongsRepository.swift similarity index 87% rename from Projects/Services/DomainModule/Sources/Songs/Repository/SongsRepository.swift rename to Projects/Domains/SongsDomain/Interface/Repository/SongsRepository.swift index 3a8b5e0f4..24f1ab859 100644 --- a/Projects/Services/DomainModule/Sources/Songs/Repository/SongsRepository.swift +++ b/Projects/Domains/SongsDomain/Interface/Repository/SongsRepository.swift @@ -1,5 +1,3 @@ -import DataMappingModule -import ErrorModule import Foundation import RxSwift diff --git a/Projects/Services/DomainModule/Sources/Songs/UseCases/FetchLyricsUseCase.swift b/Projects/Domains/SongsDomain/Interface/UseCase/FetchLyricsUseCase.swift similarity index 91% rename from Projects/Services/DomainModule/Sources/Songs/UseCases/FetchLyricsUseCase.swift rename to Projects/Domains/SongsDomain/Interface/UseCase/FetchLyricsUseCase.swift index c1959088a..7246b0978 100644 --- a/Projects/Services/DomainModule/Sources/Songs/UseCases/FetchLyricsUseCase.swift +++ b/Projects/Domains/SongsDomain/Interface/UseCase/FetchLyricsUseCase.swift @@ -6,7 +6,6 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule import Foundation import RxSwift diff --git a/Projects/Services/DomainModule/Sources/Songs/UseCases/FetchSeachSongUseCase.swift b/Projects/Domains/SongsDomain/Interface/UseCase/FetchSeachSongUseCase.swift similarity index 84% rename from Projects/Services/DomainModule/Sources/Songs/UseCases/FetchSeachSongUseCase.swift rename to Projects/Domains/SongsDomain/Interface/UseCase/FetchSeachSongUseCase.swift index 35cb2f765..38647e62a 100644 --- a/Projects/Services/DomainModule/Sources/Songs/UseCases/FetchSeachSongUseCase.swift +++ b/Projects/Domains/SongsDomain/Interface/UseCase/FetchSeachSongUseCase.swift @@ -1,4 +1,3 @@ -import DataMappingModule import Foundation import RxSwift diff --git a/Projects/Services/DomainModule/Sources/Songs/UseCases/fetchNewSongsUseCase.swift b/Projects/Domains/SongsDomain/Interface/UseCase/fetchNewSongsUseCase.swift similarity index 87% rename from Projects/Services/DomainModule/Sources/Songs/UseCases/fetchNewSongsUseCase.swift rename to Projects/Domains/SongsDomain/Interface/UseCase/fetchNewSongsUseCase.swift index d25a99646..379030e45 100644 --- a/Projects/Services/DomainModule/Sources/Songs/UseCases/fetchNewSongsUseCase.swift +++ b/Projects/Domains/SongsDomain/Interface/UseCase/fetchNewSongsUseCase.swift @@ -6,8 +6,6 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule -import ErrorModule import Foundation import RxSwift diff --git a/Projects/Domains/SongsDomain/Project.swift b/Projects/Domains/SongsDomain/Project.swift new file mode 100644 index 000000000..91210777f --- /dev/null +++ b/Projects/Domains/SongsDomain/Project.swift @@ -0,0 +1,21 @@ +import DependencyPlugin +import ProjectDescription +import ProjectDescriptionHelpers + +let project = Project.module( + name: ModulePaths.Domain.SongsDomain.rawValue, + targets: [ + .interface(module: .domain(.SongsDomain)), + .implements( + module: .domain(.SongsDomain), + dependencies: [ + .domain(target: .BaseDomain), + .domain(target: .SongsDomain, type: .interface) + ] + ), + .tests( + module: .domain(.SongsDomain), + dependencies: [.domain(target: .SongsDomain)] + ) + ] +) diff --git a/Projects/Services/APIKit/Sources/API/SongsAPI.swift b/Projects/Domains/SongsDomain/Sources/API/SongsAPI.swift similarity index 97% rename from Projects/Services/APIKit/Sources/API/SongsAPI.swift rename to Projects/Domains/SongsDomain/Sources/API/SongsAPI.swift index 6dd8c6e6a..e6ab468af 100644 --- a/Projects/Services/APIKit/Sources/API/SongsAPI.swift +++ b/Projects/Domains/SongsDomain/Sources/API/SongsAPI.swift @@ -1,7 +1,8 @@ -import DataMappingModule +import BaseDomain import ErrorModule import Foundation import Moya +import SongsDomainInterface public enum SongsAPI { case fetchSearchSong(keyword: String) diff --git a/Projects/Services/NetworkModule/Sources/Songs/Remote/RemoteSongsDataSourceImpl.swift b/Projects/Domains/SongsDomain/Sources/DataSource/RemoteSongsDataSourceImpl.swift similarity index 91% rename from Projects/Services/NetworkModule/Sources/Songs/Remote/RemoteSongsDataSourceImpl.swift rename to Projects/Domains/SongsDomain/Sources/DataSource/RemoteSongsDataSourceImpl.swift index 11f937f4a..fb21cc1be 100644 --- a/Projects/Services/NetworkModule/Sources/Songs/Remote/RemoteSongsDataSourceImpl.swift +++ b/Projects/Domains/SongsDomain/Sources/DataSource/RemoteSongsDataSourceImpl.swift @@ -1,9 +1,7 @@ -import APIKit -import DataMappingModule -import DomainModule -import ErrorModule +import BaseDomain import Foundation import RxSwift +import SongsDomainInterface public final class RemoteSongsDataSourceImpl: BaseRemoteDataSource, RemoteSongsDataSource { public func fetchSearchSong(keyword: String) -> Single { diff --git a/Projects/Services/DataModule/Sources/Songs/Repositories/SongsRepositoryImpl.swift b/Projects/Domains/SongsDomain/Sources/Repository/SongsRepositoryImpl.swift similarity index 81% rename from Projects/Services/DataModule/Sources/Songs/Repositories/SongsRepositoryImpl.swift rename to Projects/Domains/SongsDomain/Sources/Repository/SongsRepositoryImpl.swift index 100d87e63..b0699057f 100644 --- a/Projects/Services/DataModule/Sources/Songs/Repositories/SongsRepositoryImpl.swift +++ b/Projects/Domains/SongsDomain/Sources/Repository/SongsRepositoryImpl.swift @@ -1,11 +1,7 @@ -import DatabaseModule -import DataMappingModule -import DomainModule -import ErrorModule -import NetworkModule import RxSwift +import SongsDomainInterface -public struct SongsRepositoryImpl: SongsRepository { +public final class SongsRepositoryImpl: SongsRepository { private let remoteSongsDataSource: any RemoteSongsDataSource public init( diff --git a/Projects/Services/NetworkModule/Sources/Songs/DataTransfer/FetchLyricsTransfer.swift b/Projects/Domains/SongsDomain/Sources/ResponseDTO/LyricsResponseDTO.swift similarity index 64% rename from Projects/Services/NetworkModule/Sources/Songs/DataTransfer/FetchLyricsTransfer.swift rename to Projects/Domains/SongsDomain/Sources/ResponseDTO/LyricsResponseDTO.swift index 751eeb34b..3eb6a4e3b 100644 --- a/Projects/Services/NetworkModule/Sources/Songs/DataTransfer/FetchLyricsTransfer.swift +++ b/Projects/Domains/SongsDomain/Sources/ResponseDTO/LyricsResponseDTO.swift @@ -1,15 +1,18 @@ // -// FetchLyricsTransfer.swift -// NetworkModule +// LyricsResponseDTO.swift +// DataMappingModule // // Created by YoungK on 2023/02/22. // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule -import DomainModule import Foundation -import Utility +import SongsDomainInterface + +public struct LyricsResponseDTO: Decodable { + public let identifier, text, styles: String + public let start, end: Double +} public extension LyricsResponseDTO { func toDomain() -> LyricsEntity { diff --git a/Projects/Services/DataMappingModule/Sources/Songs/Response/NewSongsResponseDTO.swift b/Projects/Domains/SongsDomain/Sources/ResponseDTO/NewSongsResponseDTO.swift similarity index 65% rename from Projects/Services/DataMappingModule/Sources/Songs/Response/NewSongsResponseDTO.swift rename to Projects/Domains/SongsDomain/Sources/ResponseDTO/NewSongsResponseDTO.swift index 2689ed74b..aeb8d2072 100644 --- a/Projects/Services/DataMappingModule/Sources/Songs/Response/NewSongsResponseDTO.swift +++ b/Projects/Domains/SongsDomain/Sources/ResponseDTO/NewSongsResponseDTO.swift @@ -7,6 +7,7 @@ // import Foundation +import SongsDomainInterface public struct NewSongsResponseDTO: Decodable { public let id, title, artist: String @@ -30,3 +31,18 @@ public extension NewSongsResponseDTO { public let last: Int } } + +public extension NewSongsResponseDTO { + func toDomain() -> NewSongsEntity { + return NewSongsEntity( + id: id, + title: title, + artist: artist, + remix: remix, + reaction: reaction, + views: total?.views ?? 0, + last: total?.last ?? 0, + date: date + ) + } +} diff --git a/Projects/Services/DataMappingModule/Sources/Songs/Response/SearchResultResponseDTO.swift b/Projects/Domains/SongsDomain/Sources/ResponseDTO/SearchResultResponseDTO.swift similarity index 55% rename from Projects/Services/DataMappingModule/Sources/Songs/Response/SearchResultResponseDTO.swift rename to Projects/Domains/SongsDomain/Sources/ResponseDTO/SearchResultResponseDTO.swift index a8132b97b..06e22de38 100644 --- a/Projects/Services/DataMappingModule/Sources/Songs/Response/SearchResultResponseDTO.swift +++ b/Projects/Domains/SongsDomain/Sources/ResponseDTO/SearchResultResponseDTO.swift @@ -7,6 +7,7 @@ // import Foundation +import SongsDomainInterface public struct SearchResultResponseDTO: Decodable { public let song: [SingleSongResponseDTO] @@ -15,3 +16,13 @@ public struct SearchResultResponseDTO: Decodable { SingleSongResponseDTO ] } + +public extension SearchResultResponseDTO { + func toDomain() -> SearchResultEntity { + SearchResultEntity( + song: song.map { $0.toDomain() }, + artist: artist.map { $0.toDomain() }, + remix: remix.map { $0.toDomain() } + ) + } +} diff --git a/Projects/Services/DataMappingModule/Sources/Songs/Response/SingleSongResponseDTO.swift b/Projects/Domains/SongsDomain/Sources/ResponseDTO/SingleSongResponseDTO.swift similarity index 57% rename from Projects/Services/DataMappingModule/Sources/Songs/Response/SingleSongResponseDTO.swift rename to Projects/Domains/SongsDomain/Sources/ResponseDTO/SingleSongResponseDTO.swift index bac69f228..2966eef6b 100644 --- a/Projects/Services/DataMappingModule/Sources/Songs/Response/SingleSongResponseDTO.swift +++ b/Projects/Domains/SongsDomain/Sources/ResponseDTO/SingleSongResponseDTO.swift @@ -7,6 +7,8 @@ // import Foundation +import SongsDomainInterface +import Utility public struct SingleSongResponseDTO: Decodable { public let id, title, artist, remix, reaction: String @@ -20,8 +22,23 @@ public struct SingleSongResponseDTO: Decodable { } public extension SingleSongResponseDTO { - struct Total: Codable { + struct Total: Decodable { public let views, last: Int public let increase: Int? } } + +public extension SingleSongResponseDTO { + func toDomain() -> SongEntity { + SongEntity( + id: id, + title: title, + artist: artist, + remix: remix, + reaction: reaction, + views: total?.views ?? 0, + last: total?.last ?? 0, + date: date.changeDateFormat(origin: "yyMMdd", result: "yyyy.MM.dd") + ) + } +} diff --git a/Projects/Services/DataModule/Sources/Songs/UseCases/FetchLyricsUseCaseImpl.swift b/Projects/Domains/SongsDomain/Sources/UseCase/FetchLyricsUseCaseImpl.swift similarity index 88% rename from Projects/Services/DataModule/Sources/Songs/UseCases/FetchLyricsUseCaseImpl.swift rename to Projects/Domains/SongsDomain/Sources/UseCase/FetchLyricsUseCaseImpl.swift index beb285460..6412dda67 100644 --- a/Projects/Services/DataModule/Sources/Songs/UseCases/FetchLyricsUseCaseImpl.swift +++ b/Projects/Domains/SongsDomain/Sources/UseCase/FetchLyricsUseCaseImpl.swift @@ -6,10 +6,8 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule -import DomainModule -import ErrorModule import RxSwift +import SongsDomainInterface public struct FetchLyricsUseCaseImpl: FetchLyricsUseCase { private let songsRepository: any SongsRepository diff --git a/Projects/Services/DataModule/Sources/Songs/UseCases/FetchNewSongsUseCaseImpl.swift b/Projects/Domains/SongsDomain/Sources/UseCase/FetchNewSongsUseCaseImpl.swift similarity index 87% rename from Projects/Services/DataModule/Sources/Songs/UseCases/FetchNewSongsUseCaseImpl.swift rename to Projects/Domains/SongsDomain/Sources/UseCase/FetchNewSongsUseCaseImpl.swift index 1454cbf34..b6d00e982 100644 --- a/Projects/Services/DataModule/Sources/Songs/UseCases/FetchNewSongsUseCaseImpl.swift +++ b/Projects/Domains/SongsDomain/Sources/UseCase/FetchNewSongsUseCaseImpl.swift @@ -1,7 +1,5 @@ -import DataMappingModule -import DomainModule -import ErrorModule import RxSwift +import SongsDomainInterface public struct FetchNewSongsUseCaseImpl: FetchNewSongsUseCase { private let songsRepository: any SongsRepository diff --git a/Projects/Services/DataModule/Sources/Songs/UseCases/FetchSearchSongUseCaseImpl.swift b/Projects/Domains/SongsDomain/Sources/UseCase/FetchSearchSongUseCaseImpl.swift similarity index 86% rename from Projects/Services/DataModule/Sources/Songs/UseCases/FetchSearchSongUseCaseImpl.swift rename to Projects/Domains/SongsDomain/Sources/UseCase/FetchSearchSongUseCaseImpl.swift index 6395c111c..d2b651dc5 100644 --- a/Projects/Services/DataModule/Sources/Songs/UseCases/FetchSearchSongUseCaseImpl.swift +++ b/Projects/Domains/SongsDomain/Sources/UseCase/FetchSearchSongUseCaseImpl.swift @@ -1,7 +1,5 @@ -import DataMappingModule -import DomainModule -import ErrorModule import RxSwift +import SongsDomainInterface public struct FetchSearchSongUseCaseImpl: FetchSearchSongUseCase { private let songsRepository: any SongsRepository diff --git a/Projects/Domains/SongsDomain/Tests/SongsDomainTest.swift b/Projects/Domains/SongsDomain/Tests/SongsDomainTest.swift new file mode 100644 index 000000000..a7a935767 --- /dev/null +++ b/Projects/Domains/SongsDomain/Tests/SongsDomainTest.swift @@ -0,0 +1,11 @@ +import XCTest + +final class SongsDomainTests: XCTestCase { + override func setUpWithError() throws {} + + override func tearDownWithError() throws {} + + func testExample() { + XCTAssertEqual(1, 1) + } +} diff --git a/Projects/Services/NetworkModule/Sources/User/Remote/RemoteUserDataSource.swift b/Projects/Domains/UserDomain/Interface/DataSource/RemoteUserDataSource.swift similarity index 91% rename from Projects/Services/NetworkModule/Sources/User/Remote/RemoteUserDataSource.swift rename to Projects/Domains/UserDomain/Interface/DataSource/RemoteUserDataSource.swift index 23fe7266c..a508c8347 100644 --- a/Projects/Services/NetworkModule/Sources/User/Remote/RemoteUserDataSource.swift +++ b/Projects/Domains/UserDomain/Interface/DataSource/RemoteUserDataSource.swift @@ -1,6 +1,4 @@ -import DataMappingModule -import DomainModule -import ErrorModule +import BaseDomainInterface import Foundation import RxSwift diff --git a/Projects/Services/DomainModule/Sources/User/Entity/FavoriteSongEntity.swift b/Projects/Domains/UserDomain/Interface/Entity/FavoriteSongEntity.swift similarity index 92% rename from Projects/Services/DomainModule/Sources/User/Entity/FavoriteSongEntity.swift rename to Projects/Domains/UserDomain/Interface/Entity/FavoriteSongEntity.swift index 2ea92843f..31292cbdc 100644 --- a/Projects/Services/DomainModule/Sources/User/Entity/FavoriteSongEntity.swift +++ b/Projects/Domains/UserDomain/Interface/Entity/FavoriteSongEntity.swift @@ -1,4 +1,5 @@ import Foundation +import SongsDomainInterface public struct FavoriteSongEntity: Equatable { public init( diff --git a/Projects/Services/DomainModule/Sources/User/Entity/PlayListEntity.swift b/Projects/Domains/UserDomain/Interface/Entity/PlayListEntity.swift similarity index 95% rename from Projects/Services/DomainModule/Sources/User/Entity/PlayListEntity.swift rename to Projects/Domains/UserDomain/Interface/Entity/PlayListEntity.swift index b9a166c2a..453c0e271 100644 --- a/Projects/Services/DomainModule/Sources/User/Entity/PlayListEntity.swift +++ b/Projects/Domains/UserDomain/Interface/Entity/PlayListEntity.swift @@ -1,4 +1,5 @@ import Foundation +import SongsDomainInterface public struct PlayListEntity: Equatable { public init( diff --git a/Projects/Services/DomainModule/Sources/User/Entity/ProfileListEntity.swift b/Projects/Domains/UserDomain/Interface/Entity/ProfileListEntity.swift similarity index 100% rename from Projects/Services/DomainModule/Sources/User/Entity/ProfileListEntity.swift rename to Projects/Domains/UserDomain/Interface/Entity/ProfileListEntity.swift diff --git a/Projects/Services/DomainModule/Sources/User/Entity/UserInfoEntity.swift b/Projects/Domains/UserDomain/Interface/Entity/UserInfoEntity.swift similarity index 100% rename from Projects/Services/DomainModule/Sources/User/Entity/UserInfoEntity.swift rename to Projects/Domains/UserDomain/Interface/Entity/UserInfoEntity.swift diff --git a/Projects/Services/DomainModule/Sources/User/Repository/UserRepository.swift b/Projects/Domains/UserDomain/Interface/Repository/UserRepository.swift similarity index 95% rename from Projects/Services/DomainModule/Sources/User/Repository/UserRepository.swift rename to Projects/Domains/UserDomain/Interface/Repository/UserRepository.swift index e00ce60b9..fd7116c8d 100644 --- a/Projects/Services/DomainModule/Sources/User/Repository/UserRepository.swift +++ b/Projects/Domains/UserDomain/Interface/Repository/UserRepository.swift @@ -6,8 +6,7 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule -import ErrorModule +import BaseDomainInterface import Foundation import RxSwift diff --git a/Projects/Services/DomainModule/Sources/User/UseCases/DeleteFavoriteListUseCase.swift b/Projects/Domains/UserDomain/Interface/UseCase/DeleteFavoriteListUseCase.swift similarity index 91% rename from Projects/Services/DomainModule/Sources/User/UseCases/DeleteFavoriteListUseCase.swift rename to Projects/Domains/UserDomain/Interface/UseCase/DeleteFavoriteListUseCase.swift index d2f567089..6b3b268b6 100644 --- a/Projects/Services/DomainModule/Sources/User/UseCases/DeleteFavoriteListUseCase.swift +++ b/Projects/Domains/UserDomain/Interface/UseCase/DeleteFavoriteListUseCase.swift @@ -6,7 +6,7 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule +import BaseDomainInterface import Foundation import RxSwift diff --git a/Projects/Services/DomainModule/Sources/User/UseCases/DeletePlayListUseCase.swift b/Projects/Domains/UserDomain/Interface/UseCase/DeletePlayListUseCase.swift similarity index 82% rename from Projects/Services/DomainModule/Sources/User/UseCases/DeletePlayListUseCase.swift rename to Projects/Domains/UserDomain/Interface/UseCase/DeletePlayListUseCase.swift index 0bb9a9592..05c668db1 100644 --- a/Projects/Services/DomainModule/Sources/User/UseCases/DeletePlayListUseCase.swift +++ b/Projects/Domains/UserDomain/Interface/UseCase/DeletePlayListUseCase.swift @@ -1,4 +1,4 @@ -import DataMappingModule +import BaseDomainInterface import Foundation import RxSwift diff --git a/Projects/Services/DomainModule/Sources/User/UseCases/EditFavoriteSongsOrderUseCase.swift b/Projects/Domains/UserDomain/Interface/UseCase/EditFavoriteSongsOrderUseCase.swift similarity index 91% rename from Projects/Services/DomainModule/Sources/User/UseCases/EditFavoriteSongsOrderUseCase.swift rename to Projects/Domains/UserDomain/Interface/UseCase/EditFavoriteSongsOrderUseCase.swift index c617ddf41..eb0307841 100644 --- a/Projects/Services/DomainModule/Sources/User/UseCases/EditFavoriteSongsOrderUseCase.swift +++ b/Projects/Domains/UserDomain/Interface/UseCase/EditFavoriteSongsOrderUseCase.swift @@ -6,7 +6,7 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule +import BaseDomainInterface import Foundation import RxSwift diff --git a/Projects/Services/DomainModule/Sources/User/UseCases/EditPlayListOrderUseCase.swift b/Projects/Domains/UserDomain/Interface/UseCase/EditPlayListOrderUseCase.swift similarity index 91% rename from Projects/Services/DomainModule/Sources/User/UseCases/EditPlayListOrderUseCase.swift rename to Projects/Domains/UserDomain/Interface/UseCase/EditPlayListOrderUseCase.swift index c0ec8bf77..eadfc2e7b 100644 --- a/Projects/Services/DomainModule/Sources/User/UseCases/EditPlayListOrderUseCase.swift +++ b/Projects/Domains/UserDomain/Interface/UseCase/EditPlayListOrderUseCase.swift @@ -6,7 +6,7 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule +import BaseDomainInterface import Foundation import RxSwift diff --git a/Projects/Services/DomainModule/Sources/User/UseCases/FetchFavoriteSongsUseCase.swift b/Projects/Domains/UserDomain/Interface/UseCase/FetchFavoriteSongsUseCase.swift similarity index 91% rename from Projects/Services/DomainModule/Sources/User/UseCases/FetchFavoriteSongsUseCase.swift rename to Projects/Domains/UserDomain/Interface/UseCase/FetchFavoriteSongsUseCase.swift index 87750b146..c0f4ede3f 100644 --- a/Projects/Services/DomainModule/Sources/User/UseCases/FetchFavoriteSongsUseCase.swift +++ b/Projects/Domains/UserDomain/Interface/UseCase/FetchFavoriteSongsUseCase.swift @@ -6,7 +6,6 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule import Foundation import RxSwift diff --git a/Projects/Services/DomainModule/Sources/User/UseCases/FetchPlayListUseCase.swift b/Projects/Domains/UserDomain/Interface/UseCase/FetchPlayListUseCase.swift similarity index 91% rename from Projects/Services/DomainModule/Sources/User/UseCases/FetchPlayListUseCase.swift rename to Projects/Domains/UserDomain/Interface/UseCase/FetchPlayListUseCase.swift index 9603d9d2f..d199800d5 100644 --- a/Projects/Services/DomainModule/Sources/User/UseCases/FetchPlayListUseCase.swift +++ b/Projects/Domains/UserDomain/Interface/UseCase/FetchPlayListUseCase.swift @@ -6,7 +6,6 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule import Foundation import RxSwift diff --git a/Projects/Services/DomainModule/Sources/User/UseCases/FetchProfileListUseCase.swift b/Projects/Domains/UserDomain/Interface/UseCase/FetchProfileListUseCase.swift similarity index 91% rename from Projects/Services/DomainModule/Sources/User/UseCases/FetchProfileListUseCase.swift rename to Projects/Domains/UserDomain/Interface/UseCase/FetchProfileListUseCase.swift index d3963e9fb..4427cb91e 100644 --- a/Projects/Services/DomainModule/Sources/User/UseCases/FetchProfileListUseCase.swift +++ b/Projects/Domains/UserDomain/Interface/UseCase/FetchProfileListUseCase.swift @@ -6,7 +6,6 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule import Foundation import RxSwift diff --git a/Projects/Services/DomainModule/Sources/User/UseCases/FetchUserInfoUseCase.swift b/Projects/Domains/UserDomain/Interface/UseCase/FetchUserInfoUseCase.swift similarity index 91% rename from Projects/Services/DomainModule/Sources/User/UseCases/FetchUserInfoUseCase.swift rename to Projects/Domains/UserDomain/Interface/UseCase/FetchUserInfoUseCase.swift index 0df822b10..e7fb4cedc 100644 --- a/Projects/Services/DomainModule/Sources/User/UseCases/FetchUserInfoUseCase.swift +++ b/Projects/Domains/UserDomain/Interface/UseCase/FetchUserInfoUseCase.swift @@ -6,7 +6,6 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule import Foundation import RxSwift diff --git a/Projects/Services/DomainModule/Sources/User/UseCases/SetProfileUseCase.swift b/Projects/Domains/UserDomain/Interface/UseCase/SetProfileUseCase.swift similarity index 91% rename from Projects/Services/DomainModule/Sources/User/UseCases/SetProfileUseCase.swift rename to Projects/Domains/UserDomain/Interface/UseCase/SetProfileUseCase.swift index bbfca38f0..c8edc20ea 100644 --- a/Projects/Services/DomainModule/Sources/User/UseCases/SetProfileUseCase.swift +++ b/Projects/Domains/UserDomain/Interface/UseCase/SetProfileUseCase.swift @@ -6,7 +6,7 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule +import BaseDomainInterface import Foundation import RxSwift diff --git a/Projects/Services/DomainModule/Sources/User/UseCases/SetUserNameUseCase.swift b/Projects/Domains/UserDomain/Interface/UseCase/SetUserNameUseCase.swift similarity index 91% rename from Projects/Services/DomainModule/Sources/User/UseCases/SetUserNameUseCase.swift rename to Projects/Domains/UserDomain/Interface/UseCase/SetUserNameUseCase.swift index 7a63449b0..99c7fb5be 100644 --- a/Projects/Services/DomainModule/Sources/User/UseCases/SetUserNameUseCase.swift +++ b/Projects/Domains/UserDomain/Interface/UseCase/SetUserNameUseCase.swift @@ -6,7 +6,7 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule +import BaseDomainInterface import Foundation import RxSwift diff --git a/Projects/Services/DomainModule/Sources/User/UseCases/WithdrawUserInfoUseCase.swift b/Projects/Domains/UserDomain/Interface/UseCase/WithdrawUserInfoUseCase.swift similarity index 91% rename from Projects/Services/DomainModule/Sources/User/UseCases/WithdrawUserInfoUseCase.swift rename to Projects/Domains/UserDomain/Interface/UseCase/WithdrawUserInfoUseCase.swift index 9aaebc26e..c72bda6cb 100644 --- a/Projects/Services/DomainModule/Sources/User/UseCases/WithdrawUserInfoUseCase.swift +++ b/Projects/Domains/UserDomain/Interface/UseCase/WithdrawUserInfoUseCase.swift @@ -6,7 +6,7 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule +import BaseDomainInterface import Foundation import RxSwift diff --git a/Projects/Domains/UserDomain/Project.swift b/Projects/Domains/UserDomain/Project.swift new file mode 100644 index 000000000..4ad328d79 --- /dev/null +++ b/Projects/Domains/UserDomain/Project.swift @@ -0,0 +1,22 @@ +import DependencyPlugin +import ProjectDescription +import ProjectDescriptionHelpers + +let project = Project.module( + name: ModulePaths.Domain.UserDomain.rawValue, + targets: [ + .interface(module: .domain(.UserDomain)), + .implements( + module: .domain(.UserDomain), + dependencies: [ + .domain(target: .BaseDomain), + .domain(target: .SongsDomain), + .domain(target: .UserDomain, type: .interface) + ] + ), + .tests( + module: .domain(.UserDomain), + dependencies: [.domain(target: .UserDomain)] + ) + ] +) diff --git a/Projects/Services/APIKit/Sources/API/UserAPI.swift b/Projects/Domains/UserDomain/Sources/API/UserAPI.swift similarity index 99% rename from Projects/Services/APIKit/Sources/API/UserAPI.swift rename to Projects/Domains/UserDomain/Sources/API/UserAPI.swift index 51c70a5cd..00368a7c1 100644 --- a/Projects/Services/APIKit/Sources/API/UserAPI.swift +++ b/Projects/Domains/UserDomain/Sources/API/UserAPI.swift @@ -1,4 +1,4 @@ -import DataMappingModule +import BaseDomain import ErrorModule import Foundation import KeychainModule diff --git a/Projects/Services/NetworkModule/Sources/User/Remote/RemoteUserDataSourceImpl.swift b/Projects/Domains/UserDomain/Sources/DataSource/RemoteUserDataSourceImpl.swift similarity index 96% rename from Projects/Services/NetworkModule/Sources/User/Remote/RemoteUserDataSourceImpl.swift rename to Projects/Domains/UserDomain/Sources/DataSource/RemoteUserDataSourceImpl.swift index f1e12ef30..af59169a4 100644 --- a/Projects/Services/NetworkModule/Sources/User/Remote/RemoteUserDataSourceImpl.swift +++ b/Projects/Domains/UserDomain/Sources/DataSource/RemoteUserDataSourceImpl.swift @@ -1,9 +1,8 @@ -import APIKit -import DataMappingModule -import DomainModule -import ErrorModule +import BaseDomain +import BaseDomainInterface import Foundation import RxSwift +import UserDomainInterface public final class RemoteUserDataSourceImpl: BaseRemoteDataSource, RemoteUserDataSource { public func fetchUserInfo() -> Single { diff --git a/Projects/Services/DataModule/Sources/User/Repositories/UserRepositoryImpl.swift b/Projects/Domains/UserDomain/Sources/Repository/UserRepositoryImpl.swift similarity index 92% rename from Projects/Services/DataModule/Sources/User/Repositories/UserRepositoryImpl.swift rename to Projects/Domains/UserDomain/Sources/Repository/UserRepositoryImpl.swift index 75ccaba2b..45efc1ad6 100644 --- a/Projects/Services/DataModule/Sources/User/Repositories/UserRepositoryImpl.swift +++ b/Projects/Domains/UserDomain/Sources/Repository/UserRepositoryImpl.swift @@ -6,14 +6,12 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DatabaseModule -import DataMappingModule -import DomainModule +import BaseDomainInterface import ErrorModule -import NetworkModule import RxSwift +import UserDomainInterface -public struct UserRepositoryImpl: UserRepository { +public final class UserRepositoryImpl: UserRepository { private let remoteUserDataSource: any RemoteUserDataSource public init( diff --git a/Projects/Services/DataMappingModule/Sources/User/Response/FavoriteSongsResponseDTO.swift b/Projects/Domains/UserDomain/Sources/ResponseDTO/FavoriteSongsResponseDTO.swift similarity index 53% rename from Projects/Services/DataMappingModule/Sources/User/Response/FavoriteSongsResponseDTO.swift rename to Projects/Domains/UserDomain/Sources/ResponseDTO/FavoriteSongsResponseDTO.swift index 5e7bc4550..76533ebbb 100644 --- a/Projects/Services/DataMappingModule/Sources/User/Response/FavoriteSongsResponseDTO.swift +++ b/Projects/Domains/UserDomain/Sources/ResponseDTO/FavoriteSongsResponseDTO.swift @@ -7,6 +7,8 @@ // import Foundation +import SongsDomainInterface +import UserDomainInterface public struct FavoriteSongsResponseDTO: Decodable { public let like: Int @@ -26,3 +28,22 @@ public extension FavoriteSongsResponseDTO { public let increase: Int? } } + +public extension FavoriteSongsResponseDTO { + func toDomain() -> FavoriteSongEntity { + FavoriteSongEntity( + like: like, + song: SongEntity( + id: id, + title: title, + artist: artist, + remix: remix, + reaction: reaction, + views: total?.views ?? 0, + last: total?.last ?? 0, + date: date.changeDateFormat(origin: "yyMMdd", result: "yyyy.MM.dd") + ), + isSelected: false + ) + } +} diff --git a/Projects/Services/NetworkModule/Sources/User/DataTransfer/FetchProfileListTransfer.swift b/Projects/Domains/UserDomain/Sources/ResponseDTO/FetchProfileListResponseDTO.swift similarity index 62% rename from Projects/Services/NetworkModule/Sources/User/DataTransfer/FetchProfileListTransfer.swift rename to Projects/Domains/UserDomain/Sources/ResponseDTO/FetchProfileListResponseDTO.swift index d988d97b1..2db902b0c 100644 --- a/Projects/Services/NetworkModule/Sources/User/DataTransfer/FetchProfileListTransfer.swift +++ b/Projects/Domains/UserDomain/Sources/ResponseDTO/FetchProfileListResponseDTO.swift @@ -1,15 +1,18 @@ // -// FetchProfileListTransfer.swift -// NetworkModule +// FetchProfileListResponseDTO.swift +// DataMappingModule // // Created by KTH on 2023/02/18. // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule -import DomainModule import Foundation -import Utility +import UserDomainInterface + +public struct FetchProfileListResponseDTO: Decodable, Equatable { + public let type: String? + public let version: Int +} public extension FetchProfileListResponseDTO { func toDomain() -> ProfileListEntity { diff --git a/Projects/Services/DataMappingModule/Sources/User/Response/FetchUserResponseDTO.swift b/Projects/Domains/UserDomain/Sources/ResponseDTO/FetchUserResponseDTO.swift similarity index 63% rename from Projects/Services/DataMappingModule/Sources/User/Response/FetchUserResponseDTO.swift rename to Projects/Domains/UserDomain/Sources/ResponseDTO/FetchUserResponseDTO.swift index 6662ef1e9..1be3cef74 100644 --- a/Projects/Services/DataMappingModule/Sources/User/Response/FetchUserResponseDTO.swift +++ b/Projects/Domains/UserDomain/Sources/ResponseDTO/FetchUserResponseDTO.swift @@ -7,8 +7,9 @@ // import Foundation +import UserDomainInterface -public struct FetchUserResponseDTO: Codable, Equatable { +public struct FetchUserResponseDTO: Decodable, Equatable { public let id, platform, name: String public let profile: FetchUserResponseDTO.Profile? @@ -28,3 +29,15 @@ public extension FetchUserResponseDTO { public let version: Int } } + +public extension FetchUserResponseDTO { + func toDomain() -> UserInfoEntity { + UserInfoEntity( + id: id, + platform: platform, + name: name, + profile: profile?.type ?? "", + version: profile?.version ?? 0 + ) + } +} diff --git a/Projects/Services/DataMappingModule/Sources/User/Response/PlayListResponseDTO.swift b/Projects/Domains/UserDomain/Sources/ResponseDTO/PlayListResponseDTO.swift similarity index 62% rename from Projects/Services/DataMappingModule/Sources/User/Response/PlayListResponseDTO.swift rename to Projects/Domains/UserDomain/Sources/ResponseDTO/PlayListResponseDTO.swift index 2a295ca6e..46f847d67 100644 --- a/Projects/Services/DataMappingModule/Sources/User/Response/PlayListResponseDTO.swift +++ b/Projects/Domains/UserDomain/Sources/ResponseDTO/PlayListResponseDTO.swift @@ -7,6 +7,8 @@ // import Foundation +import SongsDomainInterface +import UserDomainInterface public struct PlayListResponseDTO: Decodable { public let title: String @@ -49,3 +51,27 @@ public extension PlayListResponseDTO.Song { public let last: Int } } + +public extension PlayListResponseDTO { + func toDomain() -> PlayListEntity { + PlayListEntity( + key: key ?? "", + title: title, + image: image.name, + songlist: songs.map { + SongEntity( + id: $0.songId, + title: $0.title, + artist: $0.artist, + remix: $0.remix, + reaction: $0.reaction, + views: $0.total.views, + last: $0.total.last, + date: "\($0.date)" + ) + }, + image_version: image.version, + isSelected: isSelected ?? false + ) + } +} diff --git a/Projects/Services/DataModule/Sources/User/UseCases/DeleteFavoriteListUseCaseImpl.swift b/Projects/Domains/UserDomain/Sources/UseCase/DeleteFavoriteListUseCaseImpl.swift similarity index 89% rename from Projects/Services/DataModule/Sources/User/UseCases/DeleteFavoriteListUseCaseImpl.swift rename to Projects/Domains/UserDomain/Sources/UseCase/DeleteFavoriteListUseCaseImpl.swift index abe327575..71c8e9b05 100644 --- a/Projects/Services/DataModule/Sources/User/UseCases/DeleteFavoriteListUseCaseImpl.swift +++ b/Projects/Domains/UserDomain/Sources/UseCase/DeleteFavoriteListUseCaseImpl.swift @@ -6,11 +6,10 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule -import DomainModule -import ErrorModule +import BaseDomainInterface import Foundation import RxSwift +import UserDomainInterface public struct DeleteFavoriteListUseCaseImpl: DeleteFavoriteListUseCase { private let userRepository: any UserRepository diff --git a/Projects/Services/DataModule/Sources/User/UseCases/DeletePlayListUseCaseImpl.swift b/Projects/Domains/UserDomain/Sources/UseCase/DeletePlayListUseCaseImpl.swift similarity index 89% rename from Projects/Services/DataModule/Sources/User/UseCases/DeletePlayListUseCaseImpl.swift rename to Projects/Domains/UserDomain/Sources/UseCase/DeletePlayListUseCaseImpl.swift index a34430faa..56f27e803 100644 --- a/Projects/Services/DataModule/Sources/User/UseCases/DeletePlayListUseCaseImpl.swift +++ b/Projects/Domains/UserDomain/Sources/UseCase/DeletePlayListUseCaseImpl.swift @@ -6,11 +6,10 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule -import DomainModule -import ErrorModule +import BaseDomainInterface import Foundation import RxSwift +import UserDomainInterface public struct DeletePlayListUseCaseImpl: DeletePlayListUseCase { private let userRepository: any UserRepository diff --git a/Projects/Services/DataModule/Sources/User/UseCases/EditFavoriteSongsOrderUseCaseImpl.swift b/Projects/Domains/UserDomain/Sources/UseCase/EditFavoriteSongsOrderUseCaseImpl.swift similarity index 89% rename from Projects/Services/DataModule/Sources/User/UseCases/EditFavoriteSongsOrderUseCaseImpl.swift rename to Projects/Domains/UserDomain/Sources/UseCase/EditFavoriteSongsOrderUseCaseImpl.swift index daa868722..4f64beb25 100644 --- a/Projects/Services/DataModule/Sources/User/UseCases/EditFavoriteSongsOrderUseCaseImpl.swift +++ b/Projects/Domains/UserDomain/Sources/UseCase/EditFavoriteSongsOrderUseCaseImpl.swift @@ -6,11 +6,10 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule -import DomainModule -import ErrorModule +import BaseDomainInterface import Foundation import RxSwift +import UserDomainInterface public struct EditFavoriteSongsOrderUseCaseImpl: EditFavoriteSongsOrderUseCase { private let userRepository: any UserRepository diff --git a/Projects/Services/DataModule/Sources/User/UseCases/EditPlayListOrderUseCaseImpl.swift b/Projects/Domains/UserDomain/Sources/UseCase/EditPlayListOrderUseCaseImpl.swift similarity index 89% rename from Projects/Services/DataModule/Sources/User/UseCases/EditPlayListOrderUseCaseImpl.swift rename to Projects/Domains/UserDomain/Sources/UseCase/EditPlayListOrderUseCaseImpl.swift index 3ab72e12b..6726649e2 100644 --- a/Projects/Services/DataModule/Sources/User/UseCases/EditPlayListOrderUseCaseImpl.swift +++ b/Projects/Domains/UserDomain/Sources/UseCase/EditPlayListOrderUseCaseImpl.swift @@ -6,11 +6,10 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule -import DomainModule -import ErrorModule +import BaseDomainInterface import Foundation import RxSwift +import UserDomainInterface public struct EditPlayListOrderUseCaseImpl: EditPlayListOrderUseCase { private let userRepository: any UserRepository diff --git a/Projects/Services/DataModule/Sources/User/UseCases/FetchFavoriteSongsUseCaseImpl.swift b/Projects/Domains/UserDomain/Sources/UseCase/FetchFavoriteSongsUseCaseImpl.swift similarity index 89% rename from Projects/Services/DataModule/Sources/User/UseCases/FetchFavoriteSongsUseCaseImpl.swift rename to Projects/Domains/UserDomain/Sources/UseCase/FetchFavoriteSongsUseCaseImpl.swift index 70db2fd71..d4198c5f8 100644 --- a/Projects/Services/DataModule/Sources/User/UseCases/FetchFavoriteSongsUseCaseImpl.swift +++ b/Projects/Domains/UserDomain/Sources/UseCase/FetchFavoriteSongsUseCaseImpl.swift @@ -6,11 +6,9 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule -import DomainModule -import ErrorModule import Foundation import RxSwift +import UserDomainInterface public struct FetchFavoriteSongsUseCaseImpl: FetchFavoriteSongsUseCase { private let userRepository: any UserRepository diff --git a/Projects/Services/DataModule/Sources/User/UseCases/FetchPlayListUseCaseImpl.swift b/Projects/Domains/UserDomain/Sources/UseCase/FetchPlayListUseCaseImpl.swift similarity index 89% rename from Projects/Services/DataModule/Sources/User/UseCases/FetchPlayListUseCaseImpl.swift rename to Projects/Domains/UserDomain/Sources/UseCase/FetchPlayListUseCaseImpl.swift index 18e516725..22eb615c4 100644 --- a/Projects/Services/DataModule/Sources/User/UseCases/FetchPlayListUseCaseImpl.swift +++ b/Projects/Domains/UserDomain/Sources/UseCase/FetchPlayListUseCaseImpl.swift @@ -6,11 +6,9 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule -import DomainModule -import ErrorModule import Foundation import RxSwift +import UserDomainInterface public struct FetchPlayListUseCaseImpl: FetchPlayListUseCase { private let userRepository: any UserRepository diff --git a/Projects/Services/DataModule/Sources/User/UseCases/FetchProfileListUseCaseImpl.swift b/Projects/Domains/UserDomain/Sources/UseCase/FetchProfileListUseCaseImpl.swift similarity index 89% rename from Projects/Services/DataModule/Sources/User/UseCases/FetchProfileListUseCaseImpl.swift rename to Projects/Domains/UserDomain/Sources/UseCase/FetchProfileListUseCaseImpl.swift index cf181b9b3..40fcd894c 100644 --- a/Projects/Services/DataModule/Sources/User/UseCases/FetchProfileListUseCaseImpl.swift +++ b/Projects/Domains/UserDomain/Sources/UseCase/FetchProfileListUseCaseImpl.swift @@ -6,11 +6,9 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule -import DomainModule -import ErrorModule import Foundation import RxSwift +import UserDomainInterface public struct FetchProfileListUseCaseImpl: FetchProfileListUseCase { private let userRepository: any UserRepository diff --git a/Projects/Services/DataModule/Sources/User/UseCases/FetchUserInfoUseCaseImpl.swift b/Projects/Domains/UserDomain/Sources/UseCase/FetchUserInfoUseCaseImpl.swift similarity index 89% rename from Projects/Services/DataModule/Sources/User/UseCases/FetchUserInfoUseCaseImpl.swift rename to Projects/Domains/UserDomain/Sources/UseCase/FetchUserInfoUseCaseImpl.swift index 3d813a583..7edf82f76 100644 --- a/Projects/Services/DataModule/Sources/User/UseCases/FetchUserInfoUseCaseImpl.swift +++ b/Projects/Domains/UserDomain/Sources/UseCase/FetchUserInfoUseCaseImpl.swift @@ -6,11 +6,9 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule -import DomainModule -import ErrorModule import Foundation import RxSwift +import UserDomainInterface public struct FetchUserInfoUseCaseImpl: FetchUserInfoUseCase { private let userRepository: any UserRepository diff --git a/Projects/Services/DataModule/Sources/User/UseCases/SetProfileUseCaseImpl.swift b/Projects/Domains/UserDomain/Sources/UseCase/SetProfileUseCaseImpl.swift similarity index 89% rename from Projects/Services/DataModule/Sources/User/UseCases/SetProfileUseCaseImpl.swift rename to Projects/Domains/UserDomain/Sources/UseCase/SetProfileUseCaseImpl.swift index ff387abab..0568f4d1e 100644 --- a/Projects/Services/DataModule/Sources/User/UseCases/SetProfileUseCaseImpl.swift +++ b/Projects/Domains/UserDomain/Sources/UseCase/SetProfileUseCaseImpl.swift @@ -6,11 +6,10 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule -import DomainModule -import ErrorModule +import BaseDomainInterface import Foundation import RxSwift +import UserDomainInterface public struct SetProfileUseCaseImpl: SetProfileUseCase { private let userRepository: any UserRepository diff --git a/Projects/Services/DataModule/Sources/User/UseCases/SetUserNameUseCaseImpl.swift b/Projects/Domains/UserDomain/Sources/UseCase/SetUserNameUseCaseImpl.swift similarity index 89% rename from Projects/Services/DataModule/Sources/User/UseCases/SetUserNameUseCaseImpl.swift rename to Projects/Domains/UserDomain/Sources/UseCase/SetUserNameUseCaseImpl.swift index e0f9826cb..d451395df 100644 --- a/Projects/Services/DataModule/Sources/User/UseCases/SetUserNameUseCaseImpl.swift +++ b/Projects/Domains/UserDomain/Sources/UseCase/SetUserNameUseCaseImpl.swift @@ -6,11 +6,10 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule -import DomainModule -import ErrorModule +import BaseDomainInterface import Foundation import RxSwift +import UserDomainInterface public struct SetUserNameUseCaseImpl: SetUserNameUseCase { private let userRepository: any UserRepository diff --git a/Projects/Services/DataModule/Sources/User/UseCases/WithdrawUserInfoUseCaseImpl.swift b/Projects/Domains/UserDomain/Sources/UseCase/WithdrawUserInfoUseCaseImpl.swift similarity index 89% rename from Projects/Services/DataModule/Sources/User/UseCases/WithdrawUserInfoUseCaseImpl.swift rename to Projects/Domains/UserDomain/Sources/UseCase/WithdrawUserInfoUseCaseImpl.swift index f86bfd324..2091622a8 100644 --- a/Projects/Services/DataModule/Sources/User/UseCases/WithdrawUserInfoUseCaseImpl.swift +++ b/Projects/Domains/UserDomain/Sources/UseCase/WithdrawUserInfoUseCaseImpl.swift @@ -6,11 +6,10 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule -import DomainModule -import ErrorModule +import BaseDomainInterface import Foundation import RxSwift +import UserDomainInterface public struct WithdrawUserInfoUseCaseImpl: WithdrawUserInfoUseCase { private let userRepository: any UserRepository diff --git a/Projects/Domains/UserDomain/Tests/UserDomainTest.swift b/Projects/Domains/UserDomain/Tests/UserDomainTest.swift new file mode 100644 index 000000000..e1c1e1670 --- /dev/null +++ b/Projects/Domains/UserDomain/Tests/UserDomainTest.swift @@ -0,0 +1,11 @@ +import XCTest + +final class UserDomainTests: XCTestCase { + override func setUpWithError() throws {} + + override func tearDownWithError() throws {} + + func testExample() { + XCTAssertEqual(1, 1) + } +} diff --git a/Projects/Features/ArtistFeature/Sources/Components/ArtistMusicComponent.swift b/Projects/Features/ArtistFeature/Sources/Components/ArtistMusicComponent.swift index e663f71d0..2a159aaf2 100644 --- a/Projects/Features/ArtistFeature/Sources/Components/ArtistMusicComponent.swift +++ b/Projects/Features/ArtistFeature/Sources/Components/ArtistMusicComponent.swift @@ -7,7 +7,6 @@ // import ArtistDomainInterface -import DataMappingModule import DomainModule import Foundation import NeedleFoundation diff --git a/Projects/Features/ArtistFeature/Sources/Components/ArtistMusicContentComponent.swift b/Projects/Features/ArtistFeature/Sources/Components/ArtistMusicContentComponent.swift index c02387d61..f04fe24de 100644 --- a/Projects/Features/ArtistFeature/Sources/Components/ArtistMusicContentComponent.swift +++ b/Projects/Features/ArtistFeature/Sources/Components/ArtistMusicContentComponent.swift @@ -8,7 +8,6 @@ import ArtistDomainInterface import CommonFeature -import DataMappingModule import DomainModule import Foundation import NeedleFoundation diff --git a/Projects/Features/ArtistFeature/Sources/ViewControllers/ArtistDetailViewController.swift b/Projects/Features/ArtistFeature/Sources/ViewControllers/ArtistDetailViewController.swift index f061584e3..9fda8e2b6 100644 --- a/Projects/Features/ArtistFeature/Sources/ViewControllers/ArtistDetailViewController.swift +++ b/Projects/Features/ArtistFeature/Sources/ViewControllers/ArtistDetailViewController.swift @@ -7,7 +7,6 @@ // import ArtistDomainInterface -import DataMappingModule import DesignSystem import DomainModule import RxCocoa diff --git a/Projects/Features/ArtistFeature/Sources/ViewControllers/ArtistMusicContentViewController.swift b/Projects/Features/ArtistFeature/Sources/ViewControllers/ArtistMusicContentViewController.swift index 2d48d498d..17c0ac104 100644 --- a/Projects/Features/ArtistFeature/Sources/ViewControllers/ArtistMusicContentViewController.swift +++ b/Projects/Features/ArtistFeature/Sources/ViewControllers/ArtistMusicContentViewController.swift @@ -9,12 +9,11 @@ import ArtistDomainInterface import BaseFeature import CommonFeature -import DataMappingModule import DesignSystem -import DomainModule import NVActivityIndicatorView import RxCocoa import RxSwift +import SongsDomainInterface import UIKit import Utility diff --git a/Projects/Features/ArtistFeature/Sources/ViewModels/ArtistMusicContentViewModel.swift b/Projects/Features/ArtistFeature/Sources/ViewModels/ArtistMusicContentViewModel.swift index dcd425224..50f3857bb 100644 --- a/Projects/Features/ArtistFeature/Sources/ViewModels/ArtistMusicContentViewModel.swift +++ b/Projects/Features/ArtistFeature/Sources/ViewModels/ArtistMusicContentViewModel.swift @@ -8,11 +8,10 @@ import ArtistDomainInterface import BaseFeature -import DataMappingModule -import DomainModule import Foundation import RxCocoa import RxSwift +import SongsDomainInterface import Utility public final class ArtistMusicContentViewModel: ViewModelType { diff --git a/Projects/Features/ArtistFeature/Sources/Views/ArtistMusicCell.swift b/Projects/Features/ArtistFeature/Sources/Views/ArtistMusicCell.swift index e91519a70..344c412d7 100644 --- a/Projects/Features/ArtistFeature/Sources/Views/ArtistMusicCell.swift +++ b/Projects/Features/ArtistFeature/Sources/Views/ArtistMusicCell.swift @@ -9,7 +9,7 @@ import ArtistDomainInterface import CommonFeature import DesignSystem -import DomainModule +import SongsDomainInterface import UIKit import Utility diff --git a/Projects/Features/ChartFeature/Sources/Components/ChartContentComponent.swift b/Projects/Features/ChartFeature/Sources/Components/ChartContentComponent.swift index 9bfaebd14..ddbc4e3c5 100644 --- a/Projects/Features/ChartFeature/Sources/Components/ChartContentComponent.swift +++ b/Projects/Features/ChartFeature/Sources/Components/ChartContentComponent.swift @@ -1,9 +1,8 @@ +import ChartDomainInterface import CommonFeature -import DataMappingModule import DomainModule import Foundation import NeedleFoundation -import ChartDomainInterface public protocol ChartContentDependency: Dependency { var fetchChartRankingUseCase: any FetchChartRankingUseCase { get } diff --git a/Projects/Features/ChartFeature/Sources/ViewContrillers/ChartContentViewController.swift b/Projects/Features/ChartFeature/Sources/ViewContrillers/ChartContentViewController.swift index b6efbdd1d..25f538eab 100644 --- a/Projects/Features/ChartFeature/Sources/ViewContrillers/ChartContentViewController.swift +++ b/Projects/Features/ChartFeature/Sources/ViewContrillers/ChartContentViewController.swift @@ -1,6 +1,5 @@ import BaseFeature import CommonFeature -import DataMappingModule import DesignSystem import DomainModule import NVActivityIndicatorView diff --git a/Projects/Features/ChartFeature/Sources/ViewModels/ChartContentViewModel.swift b/Projects/Features/ChartFeature/Sources/ViewModels/ChartContentViewModel.swift index 738ec43c7..397dc9a7f 100644 --- a/Projects/Features/ChartFeature/Sources/ViewModels/ChartContentViewModel.swift +++ b/Projects/Features/ChartFeature/Sources/ViewModels/ChartContentViewModel.swift @@ -1,11 +1,11 @@ import BaseFeature -import DataMappingModule +import ChartDomainInterface import DomainModule import Foundation import RxRelay import RxSwift +import SongsDomainInterface import Utility -import ChartDomainInterface public final class ChartContentViewModel: ViewModelType { public let type: ChartDateType diff --git a/Projects/Features/ChartFeature/Sources/Views/ChartContentTableViewCell.swift b/Projects/Features/ChartFeature/Sources/Views/ChartContentTableViewCell.swift index 0cb6e8f24..1c07fe50b 100644 --- a/Projects/Features/ChartFeature/Sources/Views/ChartContentTableViewCell.swift +++ b/Projects/Features/ChartFeature/Sources/Views/ChartContentTableViewCell.swift @@ -1,13 +1,13 @@ +import ChartDomainInterface import CommonFeature -import DataMappingModule import DesignSystem import DomainModule import Kingfisher import SnapKit +import SongsDomainInterface import Then import UIKit import Utility -import ChartDomainInterface public final class ChartContentTableViewCell: UITableViewCell { // MARK: - UI diff --git a/Projects/Features/CommonFeature/Project.swift b/Projects/Features/CommonFeature/Project.swift index 044997126..9d4123b74 100644 --- a/Projects/Features/CommonFeature/Project.swift +++ b/Projects/Features/CommonFeature/Project.swift @@ -1,11 +1,21 @@ +import DependencyPlugin import ProjectDescription import ProjectDescriptionHelpers -let project = Project.makeModule( - name: "CommonFeature", - product: .staticFramework, - dependencies: [ - .Project.Features.BaseFeature - ], - resources: ["Resources/**"] +let project = Project.module( + name: ModulePaths.Feature.CommonFeature.rawValue, + targets: [ + .implements( + module: .feature(.CommonFeature), + product: .staticFramework, + spec: .init( + resources: ["Resources/**"], + dependencies: [ + .feature(target: .BaseFeature), + .domain(target: .PlayListDomain, type: .interface), + .domain(target: .UserDomain, type: .interface) + ] + ) + ) + ] ) diff --git a/Projects/Features/CommonFeature/Sources/Components/ContainSongsComponent.swift b/Projects/Features/CommonFeature/Sources/Components/ContainSongsComponent.swift index 71ae89849..58212e26c 100644 --- a/Projects/Features/CommonFeature/Sources/Components/ContainSongsComponent.swift +++ b/Projects/Features/CommonFeature/Sources/Components/ContainSongsComponent.swift @@ -9,6 +9,8 @@ import DomainModule import Foundation import NeedleFoundation +import PlayListDomainInterface +import UserDomainInterface public protocol ContainSongsDependency: Dependency { var multiPurposePopComponent: MultiPurposePopComponent { get } diff --git a/Projects/Features/CommonFeature/Sources/Components/MultiPurposePopComponent.swift b/Projects/Features/CommonFeature/Sources/Components/MultiPurposePopComponent.swift index 22a8536f4..12cb76fb8 100644 --- a/Projects/Features/CommonFeature/Sources/Components/MultiPurposePopComponent.swift +++ b/Projects/Features/CommonFeature/Sources/Components/MultiPurposePopComponent.swift @@ -6,9 +6,10 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DomainModule import Foundation import NeedleFoundation +import PlayListDomainInterface +import UserDomainInterface public protocol MultiPurposePopDependency: Dependency { var createPlayListUseCase: any CreatePlayListUseCase { get } diff --git a/Projects/Features/CommonFeature/Sources/Components/NewSongsContentComponent.swift b/Projects/Features/CommonFeature/Sources/Components/NewSongsContentComponent.swift index 20aba9f4d..64d214ef7 100644 --- a/Projects/Features/CommonFeature/Sources/Components/NewSongsContentComponent.swift +++ b/Projects/Features/CommonFeature/Sources/Components/NewSongsContentComponent.swift @@ -6,11 +6,10 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // +import ChartDomainInterface import Foundation import NeedleFoundation -import ChartDomainInterface -import DomainModule -import DataMappingModule +import SongsDomainInterface public protocol NewSongsContentDependency: Dependency { var fetchNewSongsUseCase: any FetchNewSongsUseCase { get } diff --git a/Projects/Features/CommonFeature/Sources/Components/PlayListDetailComponent.swift b/Projects/Features/CommonFeature/Sources/Components/PlayListDetailComponent.swift index e1177ffbb..33b75cd82 100644 --- a/Projects/Features/CommonFeature/Sources/Components/PlayListDetailComponent.swift +++ b/Projects/Features/CommonFeature/Sources/Components/PlayListDetailComponent.swift @@ -6,10 +6,9 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule -import DomainModule import Foundation import NeedleFoundation +import PlayListDomainInterface public protocol PlayListDetailDependency: Dependency { var fetchPlayListDetailUseCase: any FetchPlayListDetailUseCase { get } diff --git a/Projects/Features/CommonFeature/Sources/Components/ProfilePopComponent.swift b/Projects/Features/CommonFeature/Sources/Components/ProfilePopComponent.swift index a4257a53b..6292d063b 100644 --- a/Projects/Features/CommonFeature/Sources/Components/ProfilePopComponent.swift +++ b/Projects/Features/CommonFeature/Sources/Components/ProfilePopComponent.swift @@ -6,9 +6,9 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DomainModule import Foundation import NeedleFoundation +import UserDomainInterface public protocol ProfilePopDependency: Dependency { var fetchProfileListUseCase: any FetchProfileListUseCase { get } diff --git a/Projects/Features/CommonFeature/Sources/PlayState/PlayState+Playlist.swift b/Projects/Features/CommonFeature/Sources/PlayState/PlayState+Playlist.swift index 32013c308..70357b673 100644 --- a/Projects/Features/CommonFeature/Sources/PlayState/PlayState+Playlist.swift +++ b/Projects/Features/CommonFeature/Sources/PlayState/PlayState+Playlist.swift @@ -7,8 +7,8 @@ // import Combine -import DomainModule import Foundation +import SongsDomainInterface public struct PlayListItem: Equatable { public var item: SongEntity diff --git a/Projects/Features/CommonFeature/Sources/PlayState/PlayState+Public.swift b/Projects/Features/CommonFeature/Sources/PlayState/PlayState+Public.swift index db48613a0..dc3421280 100644 --- a/Projects/Features/CommonFeature/Sources/PlayState/PlayState+Public.swift +++ b/Projects/Features/CommonFeature/Sources/PlayState/PlayState+Public.swift @@ -6,8 +6,8 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DomainModule import Foundation +import SongsDomainInterface import UIKit import Utility import YouTubePlayerKit @@ -16,7 +16,7 @@ public extension PlayState { /// 주어진 곡들을 재생목록에 추가하고 재생합니다. /// - 먼저 주어진 곡들의 첫번째 곡을 재생하며, 이후의 곡들은 재생목록의 마지막에 추가합니다. /// - Parameter duplicateAllowed: 재생목록 추가 시 중복 허용 여부 (기본값: false) - func loadAndAppendSongsToPlaylist(_ songs: [SongEntity], duplicateAllowed: Bool = false) { + func loadAndAppendSongsToPlaylist(_ songs: [SongsDomainInterface.SongEntity], duplicateAllowed: Bool = false) { if songs.isEmpty { return } // 1. 이미 있는 곡들 인덱스 찾기 // 2. 리스트에서 해당 인덱스들 곡 삭제 @@ -37,7 +37,7 @@ public extension PlayState { /// 주어진 곡들을 재생목록에 추가합니다. /// - Parameter duplicateAllowed: 재생목록 추가 시 중복 허용 여부 (기본값: false) - func appendSongsToPlaylist(_ songs: [SongEntity], duplicateAllowed: Bool = false) { + func appendSongsToPlaylist(_ songs: [SongsDomainInterface.SongEntity], duplicateAllowed: Bool = false) { let existSongIndexs = songs.uniqueElements.compactMap { self.playList.uniqueIndex(of: PlayListItem(item: $0)) } self.playList.remove(indexs: existSongIndexs) let mappedSongs = songs.uniqueElements.map { PlayListItem(item: $0) } diff --git a/Projects/Features/CommonFeature/Sources/PlayState/PlayState+YoutubePlayer.swift b/Projects/Features/CommonFeature/Sources/PlayState/PlayState+YoutubePlayer.swift index 9e399508b..5ee8fa3e3 100644 --- a/Projects/Features/CommonFeature/Sources/PlayState/PlayState+YoutubePlayer.swift +++ b/Projects/Features/CommonFeature/Sources/PlayState/PlayState+YoutubePlayer.swift @@ -6,8 +6,8 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DomainModule import Foundation +import SongsDomainInterface import Utility // MARK: YouTubePlayer 컨트롤과 관련된 메소드들을 모아놓은 익스텐션입니다. diff --git a/Projects/Features/CommonFeature/Sources/PlayState/PlayState.swift b/Projects/Features/CommonFeature/Sources/PlayState/PlayState.swift index f9ff2ba80..2d116ae0c 100644 --- a/Projects/Features/CommonFeature/Sources/PlayState/PlayState.swift +++ b/Projects/Features/CommonFeature/Sources/PlayState/PlayState.swift @@ -8,8 +8,8 @@ import AVFAudio import Combine -import DomainModule import Foundation +import SongsDomainInterface import Utility import YouTubePlayerKit diff --git a/Projects/Features/CommonFeature/Sources/Protocols/PlayButtonDelegate.swift b/Projects/Features/CommonFeature/Sources/Protocols/PlayButtonDelegate.swift index 905056ef1..13f517410 100644 --- a/Projects/Features/CommonFeature/Sources/Protocols/PlayButtonDelegate.swift +++ b/Projects/Features/CommonFeature/Sources/Protocols/PlayButtonDelegate.swift @@ -6,8 +6,8 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DomainModule import Foundation +import SongsDomainInterface public protocol PlayButtonDelegate: AnyObject { func play(model: SongEntity) diff --git a/Projects/Features/CommonFeature/Sources/ViewControllers/ContainSongsViewController.swift b/Projects/Features/CommonFeature/Sources/ViewControllers/ContainSongsViewController.swift index 588cc20bb..6ce2bc477 100644 --- a/Projects/Features/CommonFeature/Sources/ViewControllers/ContainSongsViewController.swift +++ b/Projects/Features/CommonFeature/Sources/ViewControllers/ContainSongsViewController.swift @@ -8,8 +8,8 @@ import BaseFeature import DesignSystem -import DomainModule import NVActivityIndicatorView +import PlayListDomainInterface import RxSwift import UIKit import Utility diff --git a/Projects/Features/CommonFeature/Sources/ViewControllers/NewSongsContentViewController.swift b/Projects/Features/CommonFeature/Sources/ViewControllers/NewSongsContentViewController.swift index 7fe7cb433..b89347611 100644 --- a/Projects/Features/CommonFeature/Sources/ViewControllers/NewSongsContentViewController.swift +++ b/Projects/Features/CommonFeature/Sources/ViewControllers/NewSongsContentViewController.swift @@ -7,10 +7,10 @@ // import DesignSystem -import DomainModule import NVActivityIndicatorView import RxCocoa import RxSwift +import SongsDomainInterface import UIKit import Utility diff --git a/Projects/Features/CommonFeature/Sources/ViewControllers/NewSongsViewController.swift b/Projects/Features/CommonFeature/Sources/ViewControllers/NewSongsViewController.swift index 89370af5a..ac1e4aa73 100644 --- a/Projects/Features/CommonFeature/Sources/ViewControllers/NewSongsViewController.swift +++ b/Projects/Features/CommonFeature/Sources/ViewControllers/NewSongsViewController.swift @@ -6,9 +6,9 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DataMappingModule import DesignSystem import Pageboy +import SongsDomainInterface import Tabman import UIKit import Utility diff --git a/Projects/Features/CommonFeature/Sources/ViewControllers/NoticePopupViewController.swift b/Projects/Features/CommonFeature/Sources/ViewControllers/NoticePopupViewController.swift index ef1db1f6f..53a68acfc 100644 --- a/Projects/Features/CommonFeature/Sources/ViewControllers/NoticePopupViewController.swift +++ b/Projects/Features/CommonFeature/Sources/ViewControllers/NoticePopupViewController.swift @@ -7,6 +7,7 @@ // import DesignSystem +import NoticeDomainInterface import PanModal import RxCocoa import RxSwift @@ -14,7 +15,6 @@ import SnapKit import Then import UIKit import Utility -import NoticeDomainInterface public protocol NoticePopupViewControllerDelegate: AnyObject { func noticeTapped(model: FetchNoticeEntity) diff --git a/Projects/Features/CommonFeature/Sources/ViewControllers/PlayListDetailViewController.swift b/Projects/Features/CommonFeature/Sources/ViewControllers/PlayListDetailViewController.swift index 9ebc791fb..d4e03660d 100644 --- a/Projects/Features/CommonFeature/Sources/ViewControllers/PlayListDetailViewController.swift +++ b/Projects/Features/CommonFeature/Sources/ViewControllers/PlayListDetailViewController.swift @@ -7,7 +7,6 @@ // import BaseFeature import DesignSystem -import DomainModule import Kingfisher import NVActivityIndicatorView import PanModal @@ -15,6 +14,7 @@ import RxCocoa import RxDataSources import RxRelay import RxSwift +import SongsDomainInterface import UIKit import Utility diff --git a/Projects/Features/CommonFeature/Sources/ViewControllers/ProfilePopViewController.swift b/Projects/Features/CommonFeature/Sources/ViewControllers/ProfilePopViewController.swift index a5bc885cb..a3ccf93b1 100644 --- a/Projects/Features/CommonFeature/Sources/ViewControllers/ProfilePopViewController.swift +++ b/Projects/Features/CommonFeature/Sources/ViewControllers/ProfilePopViewController.swift @@ -7,13 +7,13 @@ // import DesignSystem -import DomainModule import NVActivityIndicatorView import PanModal import RxCocoa import RxRelay import RxSwift import UIKit +import UserDomainInterface import Utility public final class ProfilePopViewController: UIViewController, ViewControllerFromStoryBoard { diff --git a/Projects/Features/CommonFeature/Sources/ViewModels/ContainSongsViewModel.swift b/Projects/Features/CommonFeature/Sources/ViewModels/ContainSongsViewModel.swift index fade26d8b..5de26f085 100644 --- a/Projects/Features/CommonFeature/Sources/ViewModels/ContainSongsViewModel.swift +++ b/Projects/Features/CommonFeature/Sources/ViewModels/ContainSongsViewModel.swift @@ -7,11 +7,12 @@ // import BaseFeature -import DomainModule import ErrorModule import Foundation +import PlayListDomainInterface import RxRelay import RxSwift +import UserDomainInterface public final class ContainSongsViewModel: ViewModelType { var fetchPlayListUseCase: FetchPlayListUseCase! diff --git a/Projects/Features/CommonFeature/Sources/ViewModels/MultiPurposePopupViewModel.swift b/Projects/Features/CommonFeature/Sources/ViewModels/MultiPurposePopupViewModel.swift index 84a46561f..e0de05c60 100644 --- a/Projects/Features/CommonFeature/Sources/ViewModels/MultiPurposePopupViewModel.swift +++ b/Projects/Features/CommonFeature/Sources/ViewModels/MultiPurposePopupViewModel.swift @@ -6,12 +6,13 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // +import BaseDomainInterface import BaseFeature -import DataMappingModule -import DomainModule import Foundation +import PlayListDomainInterface import RxRelay import RxSwift +import UserDomainInterface import Utility public final class MultiPurposePopupViewModel: ViewModelType { diff --git a/Projects/Features/CommonFeature/Sources/ViewModels/NewSongsContentViewModel.swift b/Projects/Features/CommonFeature/Sources/ViewModels/NewSongsContentViewModel.swift index 7e73fd3c6..f0b19ae04 100644 --- a/Projects/Features/CommonFeature/Sources/ViewModels/NewSongsContentViewModel.swift +++ b/Projects/Features/CommonFeature/Sources/ViewModels/NewSongsContentViewModel.swift @@ -7,13 +7,12 @@ // import BaseFeature -import DataMappingModule -import DomainModule +import ChartDomainInterface import Foundation import RxRelay import RxSwift +import SongsDomainInterface import Utility -import ChartDomainInterface public final class NewSongsContentViewModel: ViewModelType { public let type: NewSongGroupType diff --git a/Projects/Features/CommonFeature/Sources/ViewModels/NoticePopupViewModel.swift b/Projects/Features/CommonFeature/Sources/ViewModels/NoticePopupViewModel.swift index 020f0410a..0f95c496e 100644 --- a/Projects/Features/CommonFeature/Sources/ViewModels/NoticePopupViewModel.swift +++ b/Projects/Features/CommonFeature/Sources/ViewModels/NoticePopupViewModel.swift @@ -8,10 +8,10 @@ import BaseFeature import Foundation +import NoticeDomainInterface import RxCocoa import RxSwift import Utility -import NoticeDomainInterface public class NoticePopupViewModel { let input = Input() diff --git a/Projects/Features/CommonFeature/Sources/ViewModels/PlayListDetailViewModel.swift b/Projects/Features/CommonFeature/Sources/ViewModels/PlayListDetailViewModel.swift index 139a6b605..390ac627f 100644 --- a/Projects/Features/CommonFeature/Sources/ViewModels/PlayListDetailViewModel.swift +++ b/Projects/Features/CommonFeature/Sources/ViewModels/PlayListDetailViewModel.swift @@ -6,14 +6,15 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // +import BaseDomainInterface import BaseFeature -import DataMappingModule -import DomainModule import ErrorModule import Foundation +import PlayListDomainInterface import RxCocoa import RxRelay import RxSwift +import SongsDomainInterface import Utility struct PlayListHeaderInfo { diff --git a/Projects/Features/CommonFeature/Sources/ViewModels/ProfilePopViewModel.swift b/Projects/Features/CommonFeature/Sources/ViewModels/ProfilePopViewModel.swift index 2572de8b7..52d0b670d 100644 --- a/Projects/Features/CommonFeature/Sources/ViewModels/ProfilePopViewModel.swift +++ b/Projects/Features/CommonFeature/Sources/ViewModels/ProfilePopViewModel.swift @@ -6,12 +6,12 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // +import BaseDomainInterface import BaseFeature -import DataMappingModule -import DomainModule import Foundation -import RxCocoa +import RxRelay import RxSwift +import UserDomainInterface import Utility public final class ProfilePopViewModel { diff --git a/Projects/Features/CommonFeature/Sources/Views/CurrentPlayListTableViewCell.swift b/Projects/Features/CommonFeature/Sources/Views/CurrentPlayListTableViewCell.swift index 8a5258314..d782dfa89 100644 --- a/Projects/Features/CommonFeature/Sources/Views/CurrentPlayListTableViewCell.swift +++ b/Projects/Features/CommonFeature/Sources/Views/CurrentPlayListTableViewCell.swift @@ -7,8 +7,8 @@ // import DesignSystem -import DomainModule import UIKit +import UserDomainInterface import Utility class CurrentPlayListTableViewCell: UITableViewCell { diff --git a/Projects/Features/CommonFeature/Sources/Views/NewSongsCell.swift b/Projects/Features/CommonFeature/Sources/Views/NewSongsCell.swift index 383b34f52..033ac4ac5 100644 --- a/Projects/Features/CommonFeature/Sources/Views/NewSongsCell.swift +++ b/Projects/Features/CommonFeature/Sources/Views/NewSongsCell.swift @@ -7,7 +7,7 @@ // import DesignSystem -import DomainModule +import SongsDomainInterface import UIKit import Utility diff --git a/Projects/Features/CommonFeature/Sources/Views/PlayListTableViewCell.swift b/Projects/Features/CommonFeature/Sources/Views/PlayListTableViewCell.swift index b0d1cc82a..f9c0e1e3d 100644 --- a/Projects/Features/CommonFeature/Sources/Views/PlayListTableViewCell.swift +++ b/Projects/Features/CommonFeature/Sources/Views/PlayListTableViewCell.swift @@ -7,6 +7,7 @@ // import DesignSystem import DomainModule +import SongsDomainInterface import UIKit import Utility diff --git a/Projects/Features/CommonFeature/Sources/Views/ProfileCollectionViewCell.swift b/Projects/Features/CommonFeature/Sources/Views/ProfileCollectionViewCell.swift index 548459bd2..e4a0c5244 100644 --- a/Projects/Features/CommonFeature/Sources/Views/ProfileCollectionViewCell.swift +++ b/Projects/Features/CommonFeature/Sources/Views/ProfileCollectionViewCell.swift @@ -7,8 +7,8 @@ // import DesignSystem -import DomainModule import UIKit +import UserDomainInterface import Utility public enum FanType: String { diff --git a/Projects/Features/CommonFeature/Sources/Views/RecommendPlayListCell.swift b/Projects/Features/CommonFeature/Sources/Views/RecommendPlayListCell.swift index b9a975638..aa5718692 100644 --- a/Projects/Features/CommonFeature/Sources/Views/RecommendPlayListCell.swift +++ b/Projects/Features/CommonFeature/Sources/Views/RecommendPlayListCell.swift @@ -7,8 +7,8 @@ // import DesignSystem -import DomainModule import Kingfisher +import PlayListDomainInterface import UIKit import Utility diff --git a/Projects/Features/CommonFeature/Sources/Views/RecommendPlayListView.swift b/Projects/Features/CommonFeature/Sources/Views/RecommendPlayListView.swift index 3dc247ea1..5beafbd88 100644 --- a/Projects/Features/CommonFeature/Sources/Views/RecommendPlayListView.swift +++ b/Projects/Features/CommonFeature/Sources/Views/RecommendPlayListView.swift @@ -7,7 +7,7 @@ // import DesignSystem -import DomainModule +import PlayListDomainInterface import UIKit import Utility diff --git a/Projects/Features/CommonFeature/Sources/Views/SongListCell.swift b/Projects/Features/CommonFeature/Sources/Views/SongListCell.swift index 2bff8c024..c7673fb0e 100644 --- a/Projects/Features/CommonFeature/Sources/Views/SongListCell.swift +++ b/Projects/Features/CommonFeature/Sources/Views/SongListCell.swift @@ -7,9 +7,9 @@ // import DesignSystem -import DomainModule import Kingfisher import SnapKit +import SongsDomainInterface import UIKit import Utility diff --git a/Projects/Features/HomeFeature/Project.swift b/Projects/Features/HomeFeature/Project.swift index a7c52857d..dbbf601f9 100644 --- a/Projects/Features/HomeFeature/Project.swift +++ b/Projects/Features/HomeFeature/Project.swift @@ -12,7 +12,8 @@ let project = Project.module( resources: ["Resources/**"], dependencies: [ .feature(target: .PlayerFeature), - .domain(target: .ChartDomain, type: .interface) + .domain(target: .ChartDomain, type: .interface), + .domain(target: .SongsDomain, type: .interface) ] ) ) diff --git a/Projects/Features/HomeFeature/Sources/Components/HomeComponent.swift b/Projects/Features/HomeFeature/Sources/Components/HomeComponent.swift index 01b89d609..25ecd8205 100644 --- a/Projects/Features/HomeFeature/Sources/Components/HomeComponent.swift +++ b/Projects/Features/HomeFeature/Sources/Components/HomeComponent.swift @@ -6,12 +6,14 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // +import ChartDomainInterface import CommonFeature import DomainModule import Foundation import NeedleFoundation +import PlayListDomainInterface +import SongsDomainInterface import UIKit -import ChartDomainInterface public protocol HomeDependency: Dependency { var fetchChartRankingUseCase: any FetchChartRankingUseCase { get } diff --git a/Projects/Features/HomeFeature/Sources/ViewControllers/HomeViewController.swift b/Projects/Features/HomeFeature/Sources/ViewControllers/HomeViewController.swift index fda7a0562..c9393c00c 100644 --- a/Projects/Features/HomeFeature/Sources/ViewControllers/HomeViewController.swift +++ b/Projects/Features/HomeFeature/Sources/ViewControllers/HomeViewController.swift @@ -1,13 +1,14 @@ import BaseFeature import CommonFeature -import DataMappingModule import DesignSystem import DomainModule import NVActivityIndicatorView import PanModal +import PlayListDomainInterface import RxCocoa import RxSwift import SnapKit +import SongsDomainInterface import Then import UIKit import Utility diff --git a/Projects/Features/HomeFeature/Sources/ViewModels/HomeViewModel.swift b/Projects/Features/HomeFeature/Sources/ViewModels/HomeViewModel.swift index 9e578da35..61a4c0344 100644 --- a/Projects/Features/HomeFeature/Sources/ViewModels/HomeViewModel.swift +++ b/Projects/Features/HomeFeature/Sources/ViewModels/HomeViewModel.swift @@ -7,14 +7,15 @@ // import BaseFeature +import ChartDomainInterface import CommonFeature -import DataMappingModule import DomainModule import Foundation +import PlayListDomainInterface import RxCocoa import RxSwift +import SongsDomainInterface import Utility -import ChartDomainInterface public final class HomeViewModel: ViewModelType { var disposeBag = DisposeBag() diff --git a/Projects/Features/HomeFeature/Sources/Views/HomeChartCell.swift b/Projects/Features/HomeFeature/Sources/Views/HomeChartCell.swift index 085d5e28c..5ff4b41dd 100644 --- a/Projects/Features/HomeFeature/Sources/Views/HomeChartCell.swift +++ b/Projects/Features/HomeFeature/Sources/Views/HomeChartCell.swift @@ -6,13 +6,13 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // +import ChartDomainInterface import DesignSystem import DomainModule import Kingfisher import SnapKit import UIKit import Utility -import ChartDomainInterface class HomeChartCell: UITableViewCell { @IBOutlet weak var rankLabel: UILabel! diff --git a/Projects/Features/HomeFeature/Sources/Views/HomeNewSongCell.swift b/Projects/Features/HomeFeature/Sources/Views/HomeNewSongCell.swift index 3a697e4ec..ab141b61b 100644 --- a/Projects/Features/HomeFeature/Sources/Views/HomeNewSongCell.swift +++ b/Projects/Features/HomeFeature/Sources/Views/HomeNewSongCell.swift @@ -9,6 +9,7 @@ import DesignSystem import DomainModule import Kingfisher +import SongsDomainInterface import UIKit import Utility diff --git a/Projects/Features/MainTabFeature/Sources/Components/MainTabBarComponent.swift b/Projects/Features/MainTabFeature/Sources/Components/MainTabBarComponent.swift index 9d52b1859..b6c6c906a 100644 --- a/Projects/Features/MainTabFeature/Sources/Components/MainTabBarComponent.swift +++ b/Projects/Features/MainTabFeature/Sources/Components/MainTabBarComponent.swift @@ -1,10 +1,10 @@ import ArtistFeature import ChartFeature import CommonFeature -import NoticeDomainInterface import Foundation import HomeFeature import NeedleFoundation +import NoticeDomainInterface import SearchFeature import StorageFeature diff --git a/Projects/Features/MainTabFeature/Sources/ViewControllers/MainContainerViewController.swift b/Projects/Features/MainTabFeature/Sources/ViewControllers/MainContainerViewController.swift index abda1c268..3c2e42dae 100644 --- a/Projects/Features/MainTabFeature/Sources/ViewControllers/MainContainerViewController.swift +++ b/Projects/Features/MainTabFeature/Sources/ViewControllers/MainContainerViewController.swift @@ -2,10 +2,10 @@ import ArtistFeature import BaseFeature import CommonFeature import DesignSystem -import DomainModule import PlayerFeature import RxSwift import SnapKit +import SongsDomainInterface import UIKit import Utility diff --git a/Projects/Features/MainTabFeature/Sources/ViewControllers/MainTabBarViewController.swift b/Projects/Features/MainTabFeature/Sources/ViewControllers/MainTabBarViewController.swift index b39e81664..1eb8076c1 100644 --- a/Projects/Features/MainTabFeature/Sources/ViewControllers/MainTabBarViewController.swift +++ b/Projects/Features/MainTabFeature/Sources/ViewControllers/MainTabBarViewController.swift @@ -11,8 +11,8 @@ import BaseFeature import ChartFeature import CommonFeature import DesignSystem -import NoticeDomainInterface import HomeFeature +import NoticeDomainInterface import RxCocoa import RxSwift import SearchFeature diff --git a/Projects/Features/MainTabFeature/Sources/ViewModels/MainTabBarViewModel.swift b/Projects/Features/MainTabFeature/Sources/ViewModels/MainTabBarViewModel.swift index eef725c0e..608609417 100644 --- a/Projects/Features/MainTabFeature/Sources/ViewModels/MainTabBarViewModel.swift +++ b/Projects/Features/MainTabFeature/Sources/ViewModels/MainTabBarViewModel.swift @@ -6,8 +6,8 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import NoticeDomainInterface import Foundation +import NoticeDomainInterface import RxCocoa import RxSwift import Utility diff --git a/Projects/Features/PlayerFeature/Project.swift b/Projects/Features/PlayerFeature/Project.swift index 6c0fc8e5e..b654639e6 100644 --- a/Projects/Features/PlayerFeature/Project.swift +++ b/Projects/Features/PlayerFeature/Project.swift @@ -11,7 +11,8 @@ let project = Project.module( spec: .init( dependencies: [ .feature(target: .CommonFeature), - .domain(target: .LikeDomain, type: .interface) + .domain(target: .LikeDomain, type: .interface), + .domain(target: .SongsDomain, type: .interface) ] ) ) diff --git a/Projects/Features/PlayerFeature/Sources/Components/PlayerComponent.swift b/Projects/Features/PlayerFeature/Sources/Components/PlayerComponent.swift index 06e93285b..47a859687 100644 --- a/Projects/Features/PlayerFeature/Sources/Components/PlayerComponent.swift +++ b/Projects/Features/PlayerFeature/Sources/Components/PlayerComponent.swift @@ -1,8 +1,10 @@ import CommonFeature import DomainModule import Foundation -import NeedleFoundation import LikeDomainInterface +import NeedleFoundation +import SongsDomainInterface +import UserDomainInterface public protocol PlayerDependency: Dependency { var fetchLyricsUseCase: any FetchLyricsUseCase { get } diff --git a/Projects/Features/PlayerFeature/Sources/ViewModels/PlayerViewModel+API.swift b/Projects/Features/PlayerFeature/Sources/ViewModels/PlayerViewModel+API.swift index d4c831499..b2548ddfd 100644 --- a/Projects/Features/PlayerFeature/Sources/ViewModels/PlayerViewModel+API.swift +++ b/Projects/Features/PlayerFeature/Sources/ViewModels/PlayerViewModel+API.swift @@ -8,9 +8,10 @@ import DomainModule import Foundation +import LikeDomainInterface import RxSwift +import SongsDomainInterface import Utility -import LikeDomainInterface // MARK: - 뷰모델 내 API를 사용하는 함수들을 모아놓은 곳입니다. extension PlayerViewModel { diff --git a/Projects/Features/PlayerFeature/Sources/ViewModels/PlayerViewModel.swift b/Projects/Features/PlayerFeature/Sources/ViewModels/PlayerViewModel.swift index 07b111366..338c3ece7 100644 --- a/Projects/Features/PlayerFeature/Sources/ViewModels/PlayerViewModel.swift +++ b/Projects/Features/PlayerFeature/Sources/ViewModels/PlayerViewModel.swift @@ -11,11 +11,13 @@ import Combine import CommonFeature import DomainModule import Foundation +import LikeDomainInterface import RxCocoa import RxSwift +import SongsDomainInterface +import UserDomainInterface import Utility import YouTubePlayerKit -import LikeDomainInterface final class PlayerViewModel: ViewModelType { struct Input { diff --git a/Projects/Features/PlayerFeature/Sources/Views/PlaylistTableViewCell.swift b/Projects/Features/PlayerFeature/Sources/Views/PlaylistTableViewCell.swift index de468a06e..3c19e2a65 100644 --- a/Projects/Features/PlayerFeature/Sources/Views/PlaylistTableViewCell.swift +++ b/Projects/Features/PlayerFeature/Sources/Views/PlaylistTableViewCell.swift @@ -11,6 +11,7 @@ import DomainModule import Kingfisher import Lottie import SnapKit +import SongsDomainInterface import Then import UIKit import Utility diff --git a/Projects/Features/RootFeature/Project.swift b/Projects/Features/RootFeature/Project.swift index fbeef0341..f5431e4b6 100644 --- a/Projects/Features/RootFeature/Project.swift +++ b/Projects/Features/RootFeature/Project.swift @@ -13,7 +13,8 @@ let project = Project.module( dependencies: [ .feature(target: .BaseFeature), .feature(target: .MainTabFeature), - .domain(target: .AppDomain, type: .interface) + .domain(target: .AppDomain, type: .interface), + .domain(target: .UserDomain, type: .interface) ] ) ) diff --git a/Projects/Features/RootFeature/Sources/Components/RootComponent.swift b/Projects/Features/RootFeature/Sources/Components/RootComponent.swift index 71e7a68f4..81e07472e 100644 --- a/Projects/Features/RootFeature/Sources/Components/RootComponent.swift +++ b/Projects/Features/RootFeature/Sources/Components/RootComponent.swift @@ -1,8 +1,8 @@ import AppDomainInterface -import DomainModule import MainTabFeature import NeedleFoundation import UIKit +import UserDomainInterface public protocol RootDependency: Dependency { var mainContainerComponent: MainContainerComponent { get } diff --git a/Projects/Features/RootFeature/Sources/ViewModels/IntroViewModel.swift b/Projects/Features/RootFeature/Sources/ViewModels/IntroViewModel.swift index 21552dd53..ab5387d63 100644 --- a/Projects/Features/RootFeature/Sources/ViewModels/IntroViewModel.swift +++ b/Projects/Features/RootFeature/Sources/ViewModels/IntroViewModel.swift @@ -8,13 +8,13 @@ import AppDomainInterface import BaseFeature -import DataMappingModule import DomainModule import ErrorModule import Foundation import KeychainModule import RxCocoa import RxSwift +import UserDomainInterface import Utility public final class IntroViewModel: ViewModelType { diff --git a/Projects/Features/SearchFeature/Project.swift b/Projects/Features/SearchFeature/Project.swift index 54a7b636a..ac1605246 100644 --- a/Projects/Features/SearchFeature/Project.swift +++ b/Projects/Features/SearchFeature/Project.swift @@ -1,11 +1,20 @@ +import DependencyPlugin import ProjectDescription import ProjectDescriptionHelpers -let project = Project.makeModule( - name: "SearchFeature", - product: .staticFramework, - dependencies: [ - .Project.Features.PlayerFeature - ], - resources: ["Resources/**"] +let project = Project.module( + name: ModulePaths.Feature.SearchFeature.rawValue, + targets: [ + .implements( + module: .feature(.SearchFeature), + product: .staticFramework, + spec: .init( + resources: ["Resources/**"], + dependencies: [ + .feature(target: .PlayerFeature), + .domain(target: .SongsDomain, type: .interface) + ] + ) + ) + ] ) diff --git a/Projects/Features/SearchFeature/Sources/Components/AfterSearchComponent.swift b/Projects/Features/SearchFeature/Sources/Components/AfterSearchComponent.swift index efce3e39d..15536f0f4 100644 --- a/Projects/Features/SearchFeature/Sources/Components/AfterSearchComponent.swift +++ b/Projects/Features/SearchFeature/Sources/Components/AfterSearchComponent.swift @@ -7,9 +7,9 @@ // import CommonFeature -import DomainModule import Foundation import NeedleFoundation +import SongsDomainInterface public protocol AfterSearchDependency: Dependency { var afterSearchContentComponent: AfterSearchContentComponent { get } diff --git a/Projects/Features/SearchFeature/Sources/Components/BeforeSearchComponent.swift b/Projects/Features/SearchFeature/Sources/Components/BeforeSearchComponent.swift index baa3fb3a1..11bca700d 100644 --- a/Projects/Features/SearchFeature/Sources/Components/BeforeSearchComponent.swift +++ b/Projects/Features/SearchFeature/Sources/Components/BeforeSearchComponent.swift @@ -7,9 +7,9 @@ // import CommonFeature -import DomainModule import Foundation import NeedleFoundation +import PlayListDomainInterface public protocol BeforeSearchDependency: Dependency { var playListDetailComponent: PlayListDetailComponent { get } diff --git a/Projects/Features/SearchFeature/Sources/Enum/Enum+Search .swift b/Projects/Features/SearchFeature/Sources/Enum/Enum+Search .swift index 2fb520d55..bf395e20b 100644 --- a/Projects/Features/SearchFeature/Sources/Enum/Enum+Search .swift +++ b/Projects/Features/SearchFeature/Sources/Enum/Enum+Search .swift @@ -6,9 +6,9 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import DomainModule import Foundation import RxDataSources +import SongsDomainInterface public typealias SearchSectionModel = SectionModel<(TabPosition, Int), SongEntity> diff --git a/Projects/Features/SearchFeature/Sources/ViewControllers/AfterSearchViewController.swift b/Projects/Features/SearchFeature/Sources/ViewControllers/AfterSearchViewController.swift index efbd3e5ea..bb4a2eb2f 100644 --- a/Projects/Features/SearchFeature/Sources/ViewControllers/AfterSearchViewController.swift +++ b/Projects/Features/SearchFeature/Sources/ViewControllers/AfterSearchViewController.swift @@ -8,10 +8,10 @@ import CommonFeature import DesignSystem -import DomainModule import NVActivityIndicatorView import Pageboy import RxSwift +import SongsDomainInterface import Tabman import UIKit import Utility diff --git a/Projects/Features/SearchFeature/Sources/ViewControllers/BeforeSearchContentViewController.swift b/Projects/Features/SearchFeature/Sources/ViewControllers/BeforeSearchContentViewController.swift index 99e6fcdba..2e3e3434c 100644 --- a/Projects/Features/SearchFeature/Sources/ViewControllers/BeforeSearchContentViewController.swift +++ b/Projects/Features/SearchFeature/Sources/ViewControllers/BeforeSearchContentViewController.swift @@ -9,9 +9,9 @@ import BaseFeature import CommonFeature import DesignSystem -import DomainModule import NeedleFoundation import NVActivityIndicatorView +import PlayListDomainInterface import RxCocoa import RxSwift import UIKit diff --git a/Projects/Features/SearchFeature/Sources/ViewModels/AfterSearchContentViewModel.swift b/Projects/Features/SearchFeature/Sources/ViewModels/AfterSearchContentViewModel.swift index f55b896e0..4a7e6c6b3 100644 --- a/Projects/Features/SearchFeature/Sources/ViewModels/AfterSearchContentViewModel.swift +++ b/Projects/Features/SearchFeature/Sources/ViewModels/AfterSearchContentViewModel.swift @@ -7,11 +7,11 @@ // import BaseFeature -import DomainModule import Foundation import RxDataSources import RxRelay import RxSwift +import SongsDomainInterface import Utility public final class AfterSearchContentViewModel: ViewModelType { diff --git a/Projects/Features/SearchFeature/Sources/ViewModels/AfterSearchViewModel.swift b/Projects/Features/SearchFeature/Sources/ViewModels/AfterSearchViewModel.swift index 1ff677e52..21265c2c7 100644 --- a/Projects/Features/SearchFeature/Sources/ViewModels/AfterSearchViewModel.swift +++ b/Projects/Features/SearchFeature/Sources/ViewModels/AfterSearchViewModel.swift @@ -7,10 +7,10 @@ // import BaseFeature -import DomainModule import Foundation import RxRelay import RxSwift +import SongsDomainInterface import Utility public final class AfterSearchViewModel: ViewModelType { diff --git a/Projects/Features/SearchFeature/Sources/ViewModels/BeforeSearchContentViewModel.swift b/Projects/Features/SearchFeature/Sources/ViewModels/BeforeSearchContentViewModel.swift index 4f06f77ef..c289a788c 100644 --- a/Projects/Features/SearchFeature/Sources/ViewModels/BeforeSearchContentViewModel.swift +++ b/Projects/Features/SearchFeature/Sources/ViewModels/BeforeSearchContentViewModel.swift @@ -9,6 +9,7 @@ import BaseFeature import DomainModule import Foundation +import PlayListDomainInterface import RxRelay import RxSwift import Utility diff --git a/Projects/Features/SignInFeature/Project.swift b/Projects/Features/SignInFeature/Project.swift index 290a85624..e8a8d49a0 100644 --- a/Projects/Features/SignInFeature/Project.swift +++ b/Projects/Features/SignInFeature/Project.swift @@ -12,7 +12,8 @@ let project = Project.module( resources: ["Resources/**"], dependencies: [ .feature(target: .PlayerFeature), - .domain(target: .AuthDomain, type: .interface) + .domain(target: .AuthDomain, type: .interface), + .domain(target: .UserDomain, type: .interface) ] ) ) diff --git a/Projects/Features/SignInFeature/Sources/Components/SignInComponent.swift b/Projects/Features/SignInFeature/Sources/Components/SignInComponent.swift index dd6e1a29b..4f9320ed3 100644 --- a/Projects/Features/SignInFeature/Sources/Components/SignInComponent.swift +++ b/Projects/Features/SignInFeature/Sources/Components/SignInComponent.swift @@ -7,9 +7,9 @@ // import AuthDomainInterface -import DomainModule import Foundation import NeedleFoundation +import UserDomainInterface public protocol SignInDependency: Dependency { var fetchTokenUseCase: any FetchTokenUseCase { get } diff --git a/Projects/Features/SignInFeature/Sources/ViewModels/LoginViewModel.swift b/Projects/Features/SignInFeature/Sources/ViewModels/LoginViewModel.swift index 4942406f7..10956e181 100644 --- a/Projects/Features/SignInFeature/Sources/ViewModels/LoginViewModel.swift +++ b/Projects/Features/SignInFeature/Sources/ViewModels/LoginViewModel.swift @@ -16,6 +16,7 @@ import NaverThirdPartyLogin import RxCocoa import RxRelay import RxSwift +import UserDomainInterface import Utility public final class LoginViewModel: NSObject, ViewModelType { // 네이버 델리게이트를 받기위한 NSObject 상속 diff --git a/Projects/Features/StorageFeature/Project.swift b/Projects/Features/StorageFeature/Project.swift index 1a5e61a47..7a92c029d 100644 --- a/Projects/Features/StorageFeature/Project.swift +++ b/Projects/Features/StorageFeature/Project.swift @@ -13,7 +13,9 @@ let project = Project.module( dependencies: [ .feature(target: .SignInFeature), .domain(target: .FaqDomain, type: .interface), - .domain(target: .NoticeDomain, type: .interface) + .domain(target: .NoticeDomain, type: .interface), + .domain(target: .PlayListDomain, type: .interface), + .domain(target: .UserDomain, type: .interface) ] ) ) diff --git a/Projects/Features/StorageFeature/Sources/Components/AfterLoginComponent.swift b/Projects/Features/StorageFeature/Sources/Components/AfterLoginComponent.swift index 2801ae8f7..ab06c581e 100644 --- a/Projects/Features/StorageFeature/Sources/Components/AfterLoginComponent.swift +++ b/Projects/Features/StorageFeature/Sources/Components/AfterLoginComponent.swift @@ -7,9 +7,9 @@ // import CommonFeature -import DomainModule import Foundation import NeedleFoundation +import UserDomainInterface public protocol AfterLoginDependency: Dependency { var fetchUserInfoUseCase: any FetchUserInfoUseCase { get } diff --git a/Projects/Features/StorageFeature/Sources/Components/FavoriteComponent.swift b/Projects/Features/StorageFeature/Sources/Components/FavoriteComponent.swift index 0b444ea6c..6eef97ec7 100644 --- a/Projects/Features/StorageFeature/Sources/Components/FavoriteComponent.swift +++ b/Projects/Features/StorageFeature/Sources/Components/FavoriteComponent.swift @@ -7,10 +7,10 @@ // import CommonFeature -import DomainModule import Foundation import NeedleFoundation import SignInFeature +import UserDomainInterface public protocol FavoriteDependency: Dependency { var containSongsComponent: ContainSongsComponent { get } diff --git a/Projects/Features/StorageFeature/Sources/Components/MyPlayListComponent.swift b/Projects/Features/StorageFeature/Sources/Components/MyPlayListComponent.swift index f23c0891f..529dddccd 100644 --- a/Projects/Features/StorageFeature/Sources/Components/MyPlayListComponent.swift +++ b/Projects/Features/StorageFeature/Sources/Components/MyPlayListComponent.swift @@ -7,9 +7,9 @@ // import CommonFeature -import DomainModule import Foundation import NeedleFoundation +import UserDomainInterface public protocol MyPlayListDependency: Dependency { var multiPurposePopComponent: MultiPurposePopComponent { get } diff --git a/Projects/Features/StorageFeature/Sources/Components/NoticeComponent.swift b/Projects/Features/StorageFeature/Sources/Components/NoticeComponent.swift index 59620de00..60a540d58 100644 --- a/Projects/Features/StorageFeature/Sources/Components/NoticeComponent.swift +++ b/Projects/Features/StorageFeature/Sources/Components/NoticeComponent.swift @@ -6,9 +6,9 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import NoticeDomainInterface import Foundation import NeedleFoundation +import NoticeDomainInterface public protocol NoticeDependency: Dependency { var fetchNoticeUseCase: any FetchNoticeUseCase { get } diff --git a/Projects/Features/StorageFeature/Sources/Components/NoticeDetailComponent.swift b/Projects/Features/StorageFeature/Sources/Components/NoticeDetailComponent.swift index ddc8e33fc..54be55b8b 100644 --- a/Projects/Features/StorageFeature/Sources/Components/NoticeDetailComponent.swift +++ b/Projects/Features/StorageFeature/Sources/Components/NoticeDetailComponent.swift @@ -6,9 +6,9 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // -import NoticeDomainInterface import Foundation import NeedleFoundation +import NoticeDomainInterface public protocol NoticeDetailDependency: Dependency {} diff --git a/Projects/Features/StorageFeature/Sources/Components/RequestComponent.swift b/Projects/Features/StorageFeature/Sources/Components/RequestComponent.swift index 097eff66a..f172a5445 100644 --- a/Projects/Features/StorageFeature/Sources/Components/RequestComponent.swift +++ b/Projects/Features/StorageFeature/Sources/Components/RequestComponent.swift @@ -7,9 +7,9 @@ // import CommonFeature -import DomainModule import Foundation import NeedleFoundation +import UserDomainInterface public protocol RequestDependency: Dependency { var withdrawUserInfoUseCase: any WithdrawUserInfoUseCase { get } diff --git a/Projects/Features/StorageFeature/Sources/ViewControllers/AfterLoginViewController.swift b/Projects/Features/StorageFeature/Sources/ViewControllers/AfterLoginViewController.swift index 61c7f54fb..a9a200975 100644 --- a/Projects/Features/StorageFeature/Sources/ViewControllers/AfterLoginViewController.swift +++ b/Projects/Features/StorageFeature/Sources/ViewControllers/AfterLoginViewController.swift @@ -8,7 +8,6 @@ import BaseFeature import CommonFeature -import DataMappingModule import DesignSystem import KeychainModule import Pageboy diff --git a/Projects/Features/StorageFeature/Sources/ViewControllers/FavoriteViewController.swift b/Projects/Features/StorageFeature/Sources/ViewControllers/FavoriteViewController.swift index 1e23c4429..60134bf74 100644 --- a/Projects/Features/StorageFeature/Sources/ViewControllers/FavoriteViewController.swift +++ b/Projects/Features/StorageFeature/Sources/ViewControllers/FavoriteViewController.swift @@ -6,15 +6,17 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // +import BaseDomainInterface import BaseFeature import CommonFeature import DesignSystem -import DomainModule import NVActivityIndicatorView import RxDataSources import RxRelay import RxSwift +import SongsDomainInterface import UIKit +import UserDomainInterface import Utility public typealias FavoriteSectionModel = SectionModel diff --git a/Projects/Features/StorageFeature/Sources/ViewControllers/MyPlayListViewController.swift b/Projects/Features/StorageFeature/Sources/ViewControllers/MyPlayListViewController.swift index d98985803..eeca9ec2c 100644 --- a/Projects/Features/StorageFeature/Sources/ViewControllers/MyPlayListViewController.swift +++ b/Projects/Features/StorageFeature/Sources/ViewControllers/MyPlayListViewController.swift @@ -9,14 +9,15 @@ import BaseFeature import CommonFeature import DesignSystem -import DomainModule import NVActivityIndicatorView import PanModal import RxCocoa import RxDataSources import RxRelay import RxSwift +import SongsDomainInterface import UIKit +import UserDomainInterface import Utility public typealias MyPlayListSectionModel = SectionModel diff --git a/Projects/Features/StorageFeature/Sources/ViewControllers/QuestionViewController.swift b/Projects/Features/StorageFeature/Sources/ViewControllers/QuestionViewController.swift index 989993915..ebcbcddc7 100644 --- a/Projects/Features/StorageFeature/Sources/ViewControllers/QuestionViewController.swift +++ b/Projects/Features/StorageFeature/Sources/ViewControllers/QuestionViewController.swift @@ -8,7 +8,6 @@ import BaseFeature import CommonFeature -import DataMappingModule import DesignSystem import MessageUI import RxSwift diff --git a/Projects/Features/StorageFeature/Sources/ViewModels/AfterLoginStorageViewModel.swift b/Projects/Features/StorageFeature/Sources/ViewModels/AfterLoginStorageViewModel.swift index e868adab5..03733c389 100644 --- a/Projects/Features/StorageFeature/Sources/ViewModels/AfterLoginStorageViewModel.swift +++ b/Projects/Features/StorageFeature/Sources/ViewModels/AfterLoginStorageViewModel.swift @@ -8,12 +8,12 @@ import BaseFeature import CommonFeature -import DomainModule import Foundation import KeychainModule import NaverThirdPartyLogin import RxRelay import RxSwift +import UserDomainInterface import Utility public final class AfterLoginViewModel: ViewModelType { diff --git a/Projects/Features/StorageFeature/Sources/ViewModels/FavoriteViewModel.swift b/Projects/Features/StorageFeature/Sources/ViewModels/FavoriteViewModel.swift index 11b954d6a..c6feeef98 100644 --- a/Projects/Features/StorageFeature/Sources/ViewModels/FavoriteViewModel.swift +++ b/Projects/Features/StorageFeature/Sources/ViewModels/FavoriteViewModel.swift @@ -6,13 +6,15 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // +import BaseDomainInterface import BaseFeature import CommonFeature -import DomainModule import Foundation import RxCocoa import RxRelay import RxSwift +import SongsDomainInterface +import UserDomainInterface import Utility public final class FavoriteViewModel: ViewModelType { diff --git a/Projects/Features/StorageFeature/Sources/ViewModels/MyPlayListViewModel.swift b/Projects/Features/StorageFeature/Sources/ViewModels/MyPlayListViewModel.swift index 5602ff102..04fd574c7 100644 --- a/Projects/Features/StorageFeature/Sources/ViewModels/MyPlayListViewModel.swift +++ b/Projects/Features/StorageFeature/Sources/ViewModels/MyPlayListViewModel.swift @@ -6,13 +6,15 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // +import BaseDomainInterface import BaseFeature import CommonFeature -import DomainModule import Foundation import RxCocoa import RxRelay import RxSwift +import SongsDomainInterface +import UserDomainInterface import Utility public final class MyPlayListViewModel: ViewModelType { diff --git a/Projects/Features/StorageFeature/Sources/ViewModels/NoticeDetailViewModel.swift b/Projects/Features/StorageFeature/Sources/ViewModels/NoticeDetailViewModel.swift index d8acc3124..ccc08fc32 100644 --- a/Projects/Features/StorageFeature/Sources/ViewModels/NoticeDetailViewModel.swift +++ b/Projects/Features/StorageFeature/Sources/ViewModels/NoticeDetailViewModel.swift @@ -7,9 +7,9 @@ // import BaseFeature -import NoticeDomainInterface import Foundation import Kingfisher +import NoticeDomainInterface import RxCocoa import RxSwift import Utility diff --git a/Projects/Features/StorageFeature/Sources/ViewModels/NoticeViewModel.swift b/Projects/Features/StorageFeature/Sources/ViewModels/NoticeViewModel.swift index 9139c23c9..b6d68826a 100644 --- a/Projects/Features/StorageFeature/Sources/ViewModels/NoticeViewModel.swift +++ b/Projects/Features/StorageFeature/Sources/ViewModels/NoticeViewModel.swift @@ -8,10 +8,10 @@ import BaseFeature import Foundation +import NoticeDomainInterface import RxCocoa import RxSwift import Utility -import NoticeDomainInterface public class NoticeViewModel { let input = Input() diff --git a/Projects/Features/StorageFeature/Sources/ViewModels/QnaContentViewModel.swift b/Projects/Features/StorageFeature/Sources/ViewModels/QnaContentViewModel.swift index 7acd1e929..e605f3868 100644 --- a/Projects/Features/StorageFeature/Sources/ViewModels/QnaContentViewModel.swift +++ b/Projects/Features/StorageFeature/Sources/ViewModels/QnaContentViewModel.swift @@ -7,12 +7,12 @@ // import BaseFeature +import FaqDomainInterface import Foundation import KeychainModule import RxRelay import RxSwift import Utility -import FaqDomainInterface public final class QnaContentViewModel: ViewModelType { var disposeBag = DisposeBag() diff --git a/Projects/Features/StorageFeature/Sources/ViewModels/RequestViewModel.swift b/Projects/Features/StorageFeature/Sources/ViewModels/RequestViewModel.swift index dc4a78c9f..dbdfd4a5f 100644 --- a/Projects/Features/StorageFeature/Sources/ViewModels/RequestViewModel.swift +++ b/Projects/Features/StorageFeature/Sources/ViewModels/RequestViewModel.swift @@ -6,13 +6,14 @@ // Copyright © 2023 yongbeomkwak. All rights reserved. // +import BaseDomainInterface import BaseFeature -import DomainModule import Foundation import KeychainModule import NaverThirdPartyLogin import RxRelay import RxSwift +import UserDomainInterface import Utility public final class RequestViewModel: ViewModelType { diff --git a/Projects/Features/StorageFeature/Sources/Views/FavoriteTableViewCell.swift b/Projects/Features/StorageFeature/Sources/Views/FavoriteTableViewCell.swift index 9c4354314..070841470 100644 --- a/Projects/Features/StorageFeature/Sources/Views/FavoriteTableViewCell.swift +++ b/Projects/Features/StorageFeature/Sources/Views/FavoriteTableViewCell.swift @@ -8,8 +8,9 @@ import CommonFeature import DesignSystem -import DomainModule +import SongsDomainInterface import UIKit +import UserDomainInterface import Utility public protocol FavoriteTableViewCellDelegate: AnyObject { diff --git a/Projects/Features/StorageFeature/Sources/Views/MyPlayListTableViewCell.swift b/Projects/Features/StorageFeature/Sources/Views/MyPlayListTableViewCell.swift index fe16ad82f..de767826c 100644 --- a/Projects/Features/StorageFeature/Sources/Views/MyPlayListTableViewCell.swift +++ b/Projects/Features/StorageFeature/Sources/Views/MyPlayListTableViewCell.swift @@ -7,9 +7,9 @@ // import DesignSystem -import DomainModule import Kingfisher import UIKit +import UserDomainInterface import Utility public protocol MyPlayListTableViewCellDelegate: AnyObject { diff --git a/Projects/Features/StorageFeature/Sources/Views/NoticeDetailHeaderView.swift b/Projects/Features/StorageFeature/Sources/Views/NoticeDetailHeaderView.swift index 9df7c6228..fadd3e7d5 100644 --- a/Projects/Features/StorageFeature/Sources/Views/NoticeDetailHeaderView.swift +++ b/Projects/Features/StorageFeature/Sources/Views/NoticeDetailHeaderView.swift @@ -7,9 +7,9 @@ // import DesignSystem +import NoticeDomainInterface import UIKit import Utility -import NoticeDomainInterface class NoticeDetailHeaderView: UICollectionReusableView { @IBOutlet weak var titleStringLabel: UILabel! diff --git a/Projects/Features/StorageFeature/Sources/Views/NoticeListCell.swift b/Projects/Features/StorageFeature/Sources/Views/NoticeListCell.swift index 5d94972da..9c9df1b67 100644 --- a/Projects/Features/StorageFeature/Sources/Views/NoticeListCell.swift +++ b/Projects/Features/StorageFeature/Sources/Views/NoticeListCell.swift @@ -7,9 +7,9 @@ // import DesignSystem +import NoticeDomainInterface import UIKit import Utility -import NoticeDomainInterface class NoticeListCell: UITableViewCell { @IBOutlet weak var titleStringLabel: UILabel! diff --git a/Projects/Services/DataMappingModule/Sources/Playlist/Response/AddSongResponseDTO.swift b/Projects/Services/DataMappingModule/Sources/Playlist/Response/AddSongResponseDTO.swift deleted file mode 100644 index 707e7e2cf..000000000 --- a/Projects/Services/DataMappingModule/Sources/Playlist/Response/AddSongResponseDTO.swift +++ /dev/null @@ -1,7 +0,0 @@ -import Foundation - -public struct AddSongResponseDTO: Decodable { - public let status: Int - public let addedSongsLength: Int - public let duplicated: Bool -} diff --git a/Projects/Services/DataMappingModule/Sources/Playlist/Response/PlayListDetailResponseDTO.swift b/Projects/Services/DataMappingModule/Sources/Playlist/Response/PlayListDetailResponseDTO.swift deleted file mode 100644 index c2bada4be..000000000 --- a/Projects/Services/DataMappingModule/Sources/Playlist/Response/PlayListDetailResponseDTO.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// RecommendPlayListResponseDTO.swift -// DataMappingModuleTests -// -// Created by yongbeomkwak on 2023/02/10. -// Copyright © 2023 yongbeomkwak. All rights reserved. -// - -import Foundation - -public struct SinglePlayListDetailResponseDTO: Decodable { - public let key: String? - public let title: String - public let songs: [SingleSongResponseDTO]? - public let image: SinglePlayListDetailResponseDTO.Image -} - -public extension SinglePlayListDetailResponseDTO { - struct Image: Codable { - public let round: Int? - public let square: Int? - public let name: String? - public let version: Int? - } -} diff --git a/Projects/Services/DataMappingModule/Sources/Songs/Response/LyricsResponseDTO.swift b/Projects/Services/DataMappingModule/Sources/Songs/Response/LyricsResponseDTO.swift deleted file mode 100644 index 0f57a7e7b..000000000 --- a/Projects/Services/DataMappingModule/Sources/Songs/Response/LyricsResponseDTO.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// LyricsResponseDTO.swift -// DataMappingModule -// -// Created by YoungK on 2023/02/22. -// Copyright © 2023 yongbeomkwak. All rights reserved. -// - -import Foundation - -public struct LyricsResponseDTO: Decodable { - public let identifier, text, styles: String - public let start, end: Double -} diff --git a/Projects/Services/DataMappingModule/Sources/User/Response/FetchProfileListResponseDTO.swift b/Projects/Services/DataMappingModule/Sources/User/Response/FetchProfileListResponseDTO.swift deleted file mode 100644 index 60fad50b0..000000000 --- a/Projects/Services/DataMappingModule/Sources/User/Response/FetchProfileListResponseDTO.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// FetchProfileListResponseDTO.swift -// DataMappingModule -// -// Created by KTH on 2023/02/18. -// Copyright © 2023 yongbeomkwak. All rights reserved. -// - -import Foundation - -public struct FetchProfileListResponseDTO: Decodable, Equatable { - public let type: String? - public let version: Int -} diff --git a/Projects/Services/NetworkModule/Sources/Playlist/DataTransfer/EditPlayListNameTransfer.swift b/Projects/Services/NetworkModule/Sources/Playlist/DataTransfer/EditPlayListNameTransfer.swift deleted file mode 100644 index f7661663f..000000000 --- a/Projects/Services/NetworkModule/Sources/Playlist/DataTransfer/EditPlayListNameTransfer.swift +++ /dev/null @@ -1,9 +0,0 @@ -import DataMappingModule -import DomainModule -import Utility - -public extension EditPlayListNameResponseDTO { - func toDomain(title: String) -> EditPlayListNameEntity { - EditPlayListNameEntity(title: title, status: status) - } -} diff --git a/Projects/Services/NetworkModule/Sources/Playlist/DataTransfer/FetchPlayListDetailResponseDTO.swift b/Projects/Services/NetworkModule/Sources/Playlist/DataTransfer/FetchPlayListDetailResponseDTO.swift deleted file mode 100644 index 79ad7ad0a..000000000 --- a/Projects/Services/NetworkModule/Sources/Playlist/DataTransfer/FetchPlayListDetailResponseDTO.swift +++ /dev/null @@ -1,17 +0,0 @@ -import DataMappingModule -import DomainModule -import Utility - -public extension SinglePlayListDetailResponseDTO { - func toDomain() -> PlayListDetailEntity { - PlayListDetailEntity( - key: key ?? "", - title: title, - songs: songs?.map { $0.toDomain() } ?? [], - image: image.name ?? "", - image_square_version: image.square ?? 0, - image_round_version: image.round ?? 0, - version: image.version ?? 0 - ) - } -} diff --git a/Projects/Services/NetworkModule/Sources/Playlist/DataTransfer/FetchRecommendPlayListTransfer.swift b/Projects/Services/NetworkModule/Sources/Playlist/DataTransfer/FetchRecommendPlayListTransfer.swift deleted file mode 100644 index b7f7401c9..000000000 --- a/Projects/Services/NetworkModule/Sources/Playlist/DataTransfer/FetchRecommendPlayListTransfer.swift +++ /dev/null @@ -1,14 +0,0 @@ -import DataMappingModule -import DomainModule -import Utility - -public extension SingleRecommendPlayListResponseDTO { - func toDomain() -> RecommendPlayListEntity { - RecommendPlayListEntity( - key: key, - title: title, - image_round_version: image.round, - image_sqaure_version: image.square - ) - } -} diff --git a/Projects/Services/NetworkModule/Sources/Playlist/DataTransfer/PlayListBaseTransfer.swift b/Projects/Services/NetworkModule/Sources/Playlist/DataTransfer/PlayListBaseTransfer.swift deleted file mode 100644 index e12234b24..000000000 --- a/Projects/Services/NetworkModule/Sources/Playlist/DataTransfer/PlayListBaseTransfer.swift +++ /dev/null @@ -1,9 +0,0 @@ -import DataMappingModule -import DomainModule -import Utility - -public extension PlayListBaseResponseDTO { - func toDomain() -> PlayListBaseEntity { - PlayListBaseEntity(status: status, key: key) - } -} diff --git a/Projects/Services/NetworkModule/Sources/Songs/DataTransfer/FetchNewSongsTransfer.swift b/Projects/Services/NetworkModule/Sources/Songs/DataTransfer/FetchNewSongsTransfer.swift deleted file mode 100644 index 5b452556d..000000000 --- a/Projects/Services/NetworkModule/Sources/Songs/DataTransfer/FetchNewSongsTransfer.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// FetchNewSongsTransfer.swift -// NetworkModule -// -// Created by KTH on 2023/11/15. -// Copyright © 2023 yongbeomkwak. All rights reserved. -// - -import DataMappingModule -import DomainModule -import Utility - -public extension NewSongsResponseDTO { - func toDomain() -> NewSongsEntity { - return NewSongsEntity( - id: id, - title: title, - artist: artist, - remix: remix, - reaction: reaction, - views: total?.views ?? 0, - last: total?.last ?? 0, - date: date - ) - } -} diff --git a/Projects/Services/NetworkModule/Sources/Songs/DataTransfer/FetchSearchSongTransfer.swift b/Projects/Services/NetworkModule/Sources/Songs/DataTransfer/FetchSearchSongTransfer.swift deleted file mode 100644 index 18c712927..000000000 --- a/Projects/Services/NetworkModule/Sources/Songs/DataTransfer/FetchSearchSongTransfer.swift +++ /dev/null @@ -1,28 +0,0 @@ -import DataMappingModule -import DomainModule -import Utility - -public extension SingleSongResponseDTO { - func toDomain() -> SongEntity { - SongEntity( - id: id, - title: title, - artist: artist, - remix: remix, - reaction: reaction, - views: total?.views ?? 0, - last: total?.last ?? 0, - date: date.changeDateFormat(origin: "yyMMdd", result: "yyyy.MM.dd") - ) - } -} - -public extension SearchResultResponseDTO { - func toDomain() -> SearchResultEntity { - SearchResultEntity( - song: song.map { $0.toDomain() }, - artist: artist.map { $0.toDomain() }, - remix: remix.map { $0.toDomain() } - ) - } -} diff --git a/Projects/Services/NetworkModule/Sources/User/DataTransfer/FetchFavoriteSongTransfer.swift b/Projects/Services/NetworkModule/Sources/User/DataTransfer/FetchFavoriteSongTransfer.swift deleted file mode 100644 index 8d24f4852..000000000 --- a/Projects/Services/NetworkModule/Sources/User/DataTransfer/FetchFavoriteSongTransfer.swift +++ /dev/null @@ -1,22 +0,0 @@ -import DataMappingModule -import DomainModule -import Utility - -public extension FavoriteSongsResponseDTO { - func toDomain() -> FavoriteSongEntity { - FavoriteSongEntity( - like: like, - song: SongEntity( - id: id, - title: title, - artist: artist, - remix: remix, - reaction: reaction, - views: total?.views ?? 0, - last: total?.last ?? 0, - date: date.changeDateFormat(origin: "yyMMdd", result: "yyyy.MM.dd") - ), - isSelected: false - ) - } -} diff --git a/Projects/Services/NetworkModule/Sources/User/DataTransfer/FetchPlayListTransfer.swift b/Projects/Services/NetworkModule/Sources/User/DataTransfer/FetchPlayListTransfer.swift deleted file mode 100644 index 934014dba..000000000 --- a/Projects/Services/NetworkModule/Sources/User/DataTransfer/FetchPlayListTransfer.swift +++ /dev/null @@ -1,27 +0,0 @@ -import DataMappingModule -import DomainModule -import Utility - -public extension PlayListResponseDTO { - func toDomain() -> PlayListEntity { - PlayListEntity( - key: key ?? "", - title: title, - image: image.name, - songlist: songs.map { - SongEntity( - id: $0.songId, - title: $0.title, - artist: $0.artist, - remix: $0.remix, - reaction: $0.reaction, - views: $0.total.views, - last: $0.total.last, - date: "\($0.date)" - ) - }, - image_version: image.version, - isSelected: isSelected ?? false - ) - } -} diff --git a/Projects/Services/NetworkModule/Sources/User/DataTransfer/FetchUserInfoTransfer.swift b/Projects/Services/NetworkModule/Sources/User/DataTransfer/FetchUserInfoTransfer.swift deleted file mode 100644 index b22c10ee0..000000000 --- a/Projects/Services/NetworkModule/Sources/User/DataTransfer/FetchUserInfoTransfer.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// FetchUserInfoTransfer.swift -// NetworkModule -// -// Created by yongbeomkwak on 12/8/23. -// Copyright © 2023 yongbeomkwak. All rights reserved. -// - -import DataMappingModule -import DomainModule -import Foundation -import Utility - -public extension FetchUserResponseDTO { - func toDomain() -> UserInfoEntity { - UserInfoEntity( - id: id, - platform: platform, - name: name, - profile: profile?.type ?? "", - version: profile?.version ?? 0 - ) - } -} diff --git a/graph.png b/graph.png index 8aa28b002..4e9223a01 100644 Binary files a/graph.png and b/graph.png differ