Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[박물관] 미술품 가품 구분 방법 데이터 추가 #75

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading