-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from wongbingg/feature/1-domain-layer
Feature/1 domain layer
- Loading branch information
Showing
8 changed files
with
143 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
.DS_Store | ||
BoxOffice2.xcodeproj/project.xcworkspace/xcuserdata/leewonbeen.xcuserdatad/UserInterfaceState.xcuserstate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-23.9 KB
...proj/project.xcworkspace/xcuserdata/leewonbeen.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// MovieCellData.swift | ||
// BoxOffice2 | ||
// | ||
// Created by 이원빈 on 2023/02/23. | ||
// | ||
|
||
struct MovieCellData { | ||
let uuid: String | ||
let posterURL: String | ||
let currentRank: String | ||
let title: String | ||
let openDate: String | ||
let totalAudience: String | ||
let rankChange: String | ||
let isNewEntry: Bool | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// | ||
// MovieDetailData.swift | ||
// BoxOffice2 | ||
// | ||
// Created by 이원빈 on 2023/02/23. | ||
// | ||
|
||
struct MovieDetailData { | ||
let uuid: String | ||
let posterURL: String | ||
let currentRank: String | ||
let title: String | ||
let openDate: String | ||
let totalAudience: String | ||
let rankChange: String | ||
let isNewEntry: Bool | ||
let productionYear: String | ||
let openYear: String | ||
let showTime: String | ||
let genreName: String | ||
let directorName: String | ||
let actors: [String] | ||
let ageLimit: String | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// | ||
// MovieRepository.swift | ||
// BoxOffice2 | ||
// | ||
// Created by 이원빈 on 2023/02/23. | ||
// | ||
|
||
protocol MovieRepository { | ||
func fetchMovies() -> [MovieCellData] | ||
func fetchMovieDetail() -> MovieDetailData | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// | ||
// SearchMovieDetailUseCase.swift | ||
// BoxOffice2 | ||
// | ||
// Created by 이원빈 on 2023/02/23. | ||
// | ||
|
||
|
||
protocol SearchMovieDetailUseCase { | ||
func execute() -> MovieDetailData | ||
} | ||
|
||
struct DefaultSearchMovieDetailUseCase: SearchMovieDetailUseCase { | ||
let movieRepository: MovieRepository | ||
|
||
func execute() -> MovieDetailData { | ||
return movieRepository.fetchMovieDetail() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// | ||
// SearchMoviesUseCase.swift | ||
// BoxOffice2 | ||
// | ||
// Created by 이원빈 on 2023/02/23. | ||
// | ||
|
||
protocol SearchMoviesUseCase { | ||
func execute() -> [MovieCellData] | ||
} | ||
|
||
struct DefaultSearchMoviesUseCase: SearchMoviesUseCase { | ||
let movieRepository: MovieRepository | ||
|
||
func execute() -> [MovieCellData] { | ||
return movieRepository.fetchMovies() | ||
} | ||
} |