Skip to content

Commit

Permalink
Merge pull request #469 from wakmusic/feature/440-module-domain-8round
Browse files Browse the repository at this point in the history
🔀 :: (#440) 도메인 모듈 분리 8차
  • Loading branch information
KangTaeHoon authored Mar 11, 2024
2 parents 927c0d9 + 9bf8e0b commit b3df8ac
Show file tree
Hide file tree
Showing 230 changed files with 591 additions and 576 deletions.
5 changes: 4 additions & 1 deletion Projects/App/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions Projects/App/Sources/Application/AppComponent+Chart.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ChartFeature
import CommonFeature
import ChartDomain
import ChartDomainInterface
import ChartFeature
import CommonFeature

public extension AppComponent {
var chartComponent: ChartComponent {
Expand Down
4 changes: 2 additions & 2 deletions Projects/App/Sources/Application/AppComponent+Faq.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
//

import CommonFeature
import FaqDomain
import FaqDomainInterface
import NetworkModule
import SignInFeature
import StorageFeature
import FaqDomain
import FaqDomainInterface

// MARK: 변수명 주의
// AppComponent 내 변수 == Dependency 내 변수 이름 같아야함
Expand Down
4 changes: 2 additions & 2 deletions Projects/App/Sources/Application/AppComponent+Like.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
//

import CommonFeature
import SignInFeature
import StorageFeature
import LikeDomain
import LikeDomainInterface
import SignInFeature
import StorageFeature

// MARK: 변수명 주의
// AppComponent 내 변수 == Dependency 내 변수 이름 같아야함
Expand Down
2 changes: 1 addition & 1 deletion Projects/App/Sources/Application/AppComponent+Notice.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
//

import CommonFeature
import StorageFeature
import NoticeDomain
import NoticeDomainInterface
import StorageFeature

public extension AppComponent {
var noticePopupComponent: NoticePopupComponent {
Expand Down
6 changes: 2 additions & 4 deletions Projects/App/Sources/Application/AppComponent+Playlist.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 2 additions & 3 deletions Projects/App/Sources/Application/AppComponent+Songs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 2 additions & 3 deletions Projects/App/Sources/Application/AppComponent+User.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
//

import CommonFeature
import DataModule
import DomainModule
import NetworkModule
import SignInFeature
import StorageFeature
import UserDomain
import UserDomainInterface

// MARK: 변수명 주의
// AppComponent 내 변수 == Dependency 내 변수 이름 같아야함
Expand Down
6 changes: 6 additions & 0 deletions Projects/App/Sources/Application/NeedleGenerated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import NetworkModule
import NoticeDomain
import NoticeDomainInterface
import PanModal
import PlayListDomain
import PlayListDomainInterface
import PlayerFeature
import RootFeature
import RxCocoa
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import RxSwift
import BaseDomain
import ChartDomainInterface
import Foundation
import RxSwift

public final class RemoteChartDataSourceImpl: BaseRemoteDataSource<ChartAPI>, RemoteChartDataSource {
public func fetchChartRanking(type: ChartDateType, limit: Int) -> Single<[ChartRankingEntity]> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ChartDomainInterface
import Foundation
import RxSwift
import ChartDomainInterface

public final class ChartRepositoryImpl: ChartRepository {
private let remoteChartDataSource: any RemoteChartDataSource
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import ChartDomainInterface
import Foundation
import Utility

public struct SingleChartRankingResponseDTO: Decodable, Equatable {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import RxSwift
import ChartDomainInterface
import RxSwift

public struct FetchChartRankingUseCaseImpl: FetchChartRankingUseCase {
private let chartRepository: any ChartRepository
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import RxSwift
import ChartDomainInterface
import RxSwift

public struct FetchChartUpdateTimeUseCaseImpl: FetchChartUpdateTimeUseCase {
private let chartRepository: any ChartRepository
Expand Down
2 changes: 1 addition & 1 deletion Projects/Domains/FaqDomain/Sources/API/FaqAPI.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import BaseDomain
import ErrorModule
import Foundation
import KeychainModule
import Moya
import BaseDomain

public enum FaqAPI {
case fetchFaqCategories
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import RxSwift
import BaseDomain
import FaqDomainInterface
import Foundation
import RxSwift

public final class RemoteFaqDataSourceImpl: BaseRemoteDataSource<FaqAPI>, RemoteFaqDataSource {
public func fetchCategories() -> Single<FaqCategoryEntity> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import FaqDomainInterface
import Foundation

public struct FaqCategoryResponseDTO: Decodable, Equatable {
public let categories: [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright © 2023 yongbeomkwak. All rights reserved.
//

import Foundation
import FaqDomainInterface
import Foundation
import RxSwift

public struct FetchFaqCategoriesUseCaseImpl: FetchFaqCategoriesUseCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright © 2023 yongbeomkwak. All rights reserved.
//

import Foundation
import FaqDomainInterface
import Foundation
import RxSwift

public struct FetchFaqUseCaseImpl: FetchFaqUseCase {
Expand Down
2 changes: 1 addition & 1 deletion Projects/Domains/LikeDomain/Sources/API/LikeAPI.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import BaseDomain
import ErrorModule
import Foundation
import KeychainModule
import Moya
import BaseDomain

public enum LikeAPI {
case fetchLikeNumOfSong(id: String)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import RxSwift
import BaseDomain
import Foundation
import LikeDomainInterface
import RxSwift

public final class RemoteLikeDataSourceImpl: BaseRemoteDataSource<LikeAPI>, RemoteLikeDataSource {
public func fetchLikeNumOfSong(id: String) -> Single<LikeEntity> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
//

import Foundation
import RxSwift
import LikeDomainInterface
import RxSwift

public struct AddLikeSongUseCaseImpl: AddLikeSongUseCase {
private let likeRepository: any LikeRepository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright © 2023 yongbeomkwak. All rights reserved.
//

import LikeDomainInterface
import Foundation
import LikeDomainInterface
import RxSwift

public struct CancelLikeSongUseCaseImpl: CancelLikeSongUseCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright © 2023 yongbeomkwak. All rights reserved.
//

import LikeDomainInterface
import Foundation
import LikeDomainInterface
import RxSwift

public struct FetchLikeNumOfSongUseCaseImpl: FetchLikeNumOfSongUseCase {
Expand Down
4 changes: 2 additions & 2 deletions Projects/Domains/NoticeDomain/Sources/API/NoticeAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<NoticeAPI>, RemoteNoticeDataSource {
public func fetchNotice(type: NoticeType) -> Single<[FetchNoticeEntity]> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
//

import Foundation
import RxSwift
import NoticeDomainInterface
import RxSwift

public final class NoticeRepositoryImpl: NoticeRepository {
private let remoteNoticeDataSource: any RemoteNoticeDataSource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
//

import Foundation
import RxSwift
import NoticeDomainInterface
import RxSwift

public struct FetchNoticeCategoriesUseCaseImpl: FetchNoticeCategoriesUseCase {
private let noticeRepository: any NoticeRepository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
//

import Foundation
import RxSwift
import NoticeDomainInterface
import RxSwift

public struct FetchNoticeUseCaseImpl: FetchNoticeUseCase {
private let noticeRepository: any NoticeRepository
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import DataMappingModule
import DomainModule
import ErrorModule
import BaseDomainInterface
import Foundation
import RxSwift

Expand All @@ -10,7 +8,6 @@ public protocol RemotePlayListDataSource {
func createPlayList(title: String) -> Single<PlayListBaseEntity>
func editPlayList(key: String, songs: [String]) -> Single<BaseEntity>
func editPlayListName(key: String, title: String) -> Single<EditPlayListNameEntity>
func deletePlayList(key: String) -> Single<BaseEntity>
func loadPlayList(key: String) -> Single<PlayListBaseEntity>
func addSongIntoPlayList(key: String, songs: [String]) -> Single<AddSongEntity>
func removeSongs(key: String, songs: [String]) -> Single<BaseEntity>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import Foundation
import SongsDomainInterface

public struct PlayListDetailEntity: Equatable {
public init(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import DataMappingModule
import ErrorModule
import BaseDomainInterface
import Foundation
import RxSwift

Expand All @@ -9,7 +8,6 @@ public protocol PlayListRepository {
func createPlayList(title: String) -> Single<PlayListBaseEntity>
func editPlayList(key: String, songs: [String]) -> Single<BaseEntity>
func editPlayListName(key: String, title: String) -> Single<EditPlayListNameEntity>
func deletePlayList(key: String) -> Single<BaseEntity>
func loadPlayList(key: String) -> Single<PlayListBaseEntity>
func addSongIntoPlayList(key: String, songs: [String]) -> Single<AddSongEntity>
func removeSongs(key: String, songs: [String]) -> Single<BaseEntity>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import DataMappingModule
import Foundation
import RxSwift

Expand Down
Loading

0 comments on commit b3df8ac

Please sign in to comment.