Skip to content

Commit

Permalink
refactor: Mod PropertyName & Delete Unnecessary func
Browse files Browse the repository at this point in the history
변수명 수정 및 불필요한 함수 제거

issue: #27
  • Loading branch information
youngminshim-de committed Apr 23, 2021
1 parent 8771f44 commit f1dc464
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 16 deletions.
8 changes: 4 additions & 4 deletions iOS/SideDish/SideDish.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
D4BFBB0A262E9A8200D68297 /* DetailBanchanViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4BFBB08262E9A8100D68297 /* DetailBanchanViewController.swift */; };
D4BFBB0B262E9A8200D68297 /* DetailBanchanViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = D4BFBB09262E9A8200D68297 /* DetailBanchanViewController.xib */; };
D4BFBB2A262EA93700D68297 /* Banchan.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4BFBB29262EA93700D68297 /* Banchan.swift */; };
D4BFBB2F262EAD1C00D68297 /* DetailBanchan.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4BFBB2E262EAD1C00D68297 /* DetailBanchan.swift */; };
D4BFBB2F262EAD1C00D68297 /* BanchanDetail.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4BFBB2E262EAD1C00D68297 /* BanchanDetail.swift */; };
D4BFBB35262EB89800D68297 /* BanchanCustomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4BFBB33262EB89800D68297 /* BanchanCustomCell.swift */; };
D4BFBB36262EB89800D68297 /* BanchanCustomCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = D4BFBB34262EB89800D68297 /* BanchanCustomCell.xib */; };
D4BFBB3C262EC8DB00D68297 /* BanchanCustomCellHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4BFBB3A262EC8DB00D68297 /* BanchanCustomCellHeader.swift */; };
Expand Down Expand Up @@ -78,7 +78,7 @@
D4BFBB08262E9A8100D68297 /* DetailBanchanViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailBanchanViewController.swift; sourceTree = "<group>"; };
D4BFBB09262E9A8200D68297 /* DetailBanchanViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DetailBanchanViewController.xib; sourceTree = "<group>"; };
D4BFBB29262EA93700D68297 /* Banchan.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Banchan.swift; sourceTree = "<group>"; };
D4BFBB2E262EAD1C00D68297 /* DetailBanchan.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailBanchan.swift; sourceTree = "<group>"; };
D4BFBB2E262EAD1C00D68297 /* BanchanDetail.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BanchanDetail.swift; sourceTree = "<group>"; };
D4BFBB33262EB89800D68297 /* BanchanCustomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BanchanCustomCell.swift; sourceTree = "<group>"; };
D4BFBB34262EB89800D68297 /* BanchanCustomCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BanchanCustomCell.xib; sourceTree = "<group>"; };
D4BFBB3A262EC8DB00D68297 /* BanchanCustomCellHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BanchanCustomCellHeader.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -292,7 +292,7 @@
isa = PBXGroup;
children = (
D4BFBB29262EA93700D68297 /* Banchan.swift */,
D4BFBB2E262EAD1C00D68297 /* DetailBanchan.swift */,
D4BFBB2E262EAD1C00D68297 /* BanchanDetail.swift */,
);
path = Entities;
sourceTree = "<group>";
Expand Down Expand Up @@ -588,7 +588,7 @@
D4BFBAD5262E989000D68297 /* SceneDelegate.swift in Sources */,
FFA10EB1262FC6CD00D584B6 /* BanchanCollectionView.swift in Sources */,
D4BFBB0A262E9A8200D68297 /* DetailBanchanViewController.swift in Sources */,
D4BFBB2F262EAD1C00D68297 /* DetailBanchan.swift in Sources */,
D4BFBB2F262EAD1C00D68297 /* BanchanDetail.swift in Sources */,
FFEF71042631107200189376 /* FetchBanchanListUseCase.swift in Sources */,
FFEF70FF2631104B00189376 /* BanchanListDTO+Mapping.swift in Sources */,
D4BFBB35262EB89800D68297 /* BanchanCustomCell.swift in Sources */,
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

import Foundation

struct BanchanListDTO: Codable {
struct BanchanListDTO: Decodable {
private let body: [BanchanListItemDTO]
}

extension BanchanListDTO {
struct BanchanListItemDTO: Codable {
struct BanchanListItemDTO: Decodable {
private let detailHash: String
private let image: String
private let alt: String
Expand All @@ -24,7 +24,7 @@ extension BanchanListDTO {
private let badge: [String]?

func toDomain() -> Banchan {
return .init(detailHash: detailHash, image: image, alt: alt, title: title, description: description, nPrice: nPrice, sPrice: sPrice, badge: badge, deliveryType: deliveryType)
return .init(detailHash: detailHash, image: image, alt: alt, title: title, description: description, nPrice: nPrice, sPrice: sPrice, badges: badge, deliveryType: deliveryType)
}
}

Expand Down
2 changes: 1 addition & 1 deletion iOS/SideDish/SideDish/Domain/Entities/Banchan.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct Banchan: Hashable {
private (set) var description: String
private (set) var nPrice: String?
private (set) var sPrice: String
private (set) var badge: [String]?
private (set) var badges: [String]?
private (set) var deliveryType: [String]

func hash(into hasher: inout Hasher) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation

struct DetailBanchan {
struct BanchanDetail {
private var topImage: URL
private var thumbImages: [URL]
private var detailImage: [URL]
Expand All @@ -18,5 +18,5 @@ struct DetailBanchan {
private var point: Int
private var netPrice: Int
private var salePrice: Int?
private var badge: [PriceType]
private var badges: [PriceType]
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class BanchanCustomCell: UICollectionViewCell {
descriptionLabel.text = banchan?.description
setNPrice(text: banchan?.nPrice)
sPriceLabel.text = banchan?.sPrice
setBadges(badges: banchan?.badge)
setBadges(badges: banchan?.badges)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ extension BanchanListViewController {

view.configure(title: section.description(), count: self.viewModel.count(section: section))
return view

}
return dataSource
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ class BanchanListViewModel {
})
}

func sectionCount() -> Int {
return Section.allCases.count
}

func getBanchans(section: Section) -> [Banchan]? {
return menu[section]
}
Expand Down

0 comments on commit f1dc464

Please sign in to comment.