Skip to content

Commit

Permalink
[박물관] 미술품 가품 구분 방법 데이터 추가 (#75)
Browse files Browse the repository at this point in the history
feat: 미술품 구분 방법 데이터를 추가
  • Loading branch information
leeari95 authored Nov 19, 2024
1 parent cf39b62 commit 0d0f372
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ Find the villagers you have visited and tap the home icon on the villager's page
"Original" = "Original";
"Fake" = "Fake";
"keyword" = "keyword";
"differences" = "Differences";

"Disguised on shoreline" = "Disguised on shoreline";
"Disguised under trees" = "Disguised under trees";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@
"Whether fake" = "가짜 여부";
"Original" = "진품";
"Fake" = "가품";
"differences" = "구분 방법";

// MARK: - WhereHow
"Disguised on shoreline" = "해안선 근처";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ struct Item {

var highResTexture: String?
var genuine: Bool?
var fakeDifferences: Translations?
var artCategory: ArtCategory?
var size: Size?
var source: String?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ struct ArtResponseDTO: Codable {
let translations: Translations
let colors: [Color]
let concepts: [Concept]
let fakeDifferences: Translations?

enum CodingKeys: String, CodingKey {
case name, image, highResTexture, genuine, category, buy, sell, size,
realArtworkTitle, artist, description, source, hhaBasePoints,
interact, tag, unlocked, filename, internalId, uniqueEntryId,
translations, colors, concepts
case fakeDifferences = "fake_differences"
}
}

enum ArtCategory: String, Codable {
Expand Down Expand Up @@ -147,6 +156,7 @@ extension ArtResponseDTO: DomainConvertible {
image: self.image,
highResTexture: self.highResTexture,
genuine: self.genuine,
fakeDifferences: self.fakeDifferences,
artCategory: self.category,
buy: self.buy,
sell: self.sell ?? 0,
Expand All @@ -168,6 +178,7 @@ extension Item {
image: String,
highResTexture: String?,
genuine: Bool,
fakeDifferences: Translations?,
artCategory: ArtCategory,
buy: Int,
sell: Int,
Expand All @@ -183,6 +194,7 @@ extension Item {
self.image = image
self.highResTexture = highResTexture
self.genuine = genuine
self.fakeDifferences = fakeDifferences
self.artCategory = artCategory
self.buy = buy
self.sell = sell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,11 @@ class ItemOtherInfoView: UIView {
let fakeInfoLabel = descriptionLabel(genuine ? "Original".localized : "Fake".localized)
let fakeInfo = InfoContentView(title: "Whether fake".localized, contentView: fakeInfoLabel)
backgroundStackView.addArrangedSubviews(fakeInfo)

if let fakeDifferences = item.fakeDifferences {
let fakeDetailLabel = descriptionLabel(fakeDifferences.localizedName())
let fakeDetail = InfoContentView(title: "differences".localized, contentView: fakeDetailLabel)
backgroundStackView.addArrangedSubviews(fakeDetail)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ final class Items {
fetchItem(FloorsRequest(), itemKey: .floors, group: group) {
itemList.merge($0) { _, new in new }
}
fetchItem(RugsRequest(), itemKey: .floors, group: group) {
fetchItem(RugsRequest(), itemKey: .rugs, group: group) {
itemList.merge($0) { _, new in new }
}
fetchItem(OtherRequest(), itemKey: .other, group: group) {
Expand Down

0 comments on commit 0d0f372

Please sign in to comment.