Skip to content

Commit 43b0e25

Browse files
committed
[chore] #157 BaseContentItem 속성값 추가
1 parent 389daa5 commit 43b0e25

File tree

7 files changed

+26
-7
lines changed

7 files changed

+26
-7
lines changed

Projects/App/Sources/MainTab/MainTabPath.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public extension MainTabFeature {
216216
),
217217
title: content.title,
218218
data: content.data,
219-
memo: content.memo,
219+
memo: content.memo ?? "",
220220
createdAt: content.createdAt,
221221
favorites: nil,
222222
alertYn: .no

Projects/CoreKit/Sources/Data/DTO/Base/ContentBaseResponse.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ public struct ContentBaseResponse: Decodable {
1313
public let data: String
1414
public let domain: String
1515
public let title: String
16+
public let memo: String?
1617
public let thumbNail: String
1718
public let createdAt: String
1819
public let isRead: Bool?
20+
public let isFavorite: Bool?
1921
}
2022

2123
extension ContentBaseResponse {
@@ -29,9 +31,11 @@ extension ContentBaseResponse {
2931
data: "https://www.youtube.com/watch?v=wtSwdGJzQCQ",
3032
domain: "youtube",
3133
title: "신서유기",
34+
memo: nil,
3235
thumbNail: "https://i.ytimg.com/vi/NnOC4_kH0ok/hqdefault.jpg?sqp=-oaymwEjCNACELwBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLDN6u6mTjbaVmRZ4biJS_aDq4uvAQ",
3336
createdAt: "2024.08.08",
34-
isRead: false
37+
isRead: false,
38+
isFavorite: true
3539
)
3640
}
3741
}

Projects/Domain/Sources/Base/BaseContentItem.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,31 +14,37 @@ public struct BaseContentItem: Identifiable, Equatable, PokitLinkCardItem, Sorta
1414
public let categoryName: String
1515
public let categoryId: Int
1616
public let title: String
17+
public let memo: String?
1718
public var thumbNail: String
1819
public let data: String
1920
public let domain: String
2021
public let createdAt: String
2122
public let isRead: Bool?
23+
public let isFavorite: Bool?
2224

2325
public init(
2426
id: Int,
2527
categoryName: String,
2628
categoryId: Int,
2729
title: String,
30+
memo: String?,
2831
thumbNail: String,
2932
data: String,
3033
domain: String,
3134
createdAt: String,
32-
isRead: Bool?
35+
isRead: Bool?,
36+
isFavorite: Bool?
3337
) {
3438
self.id = id
3539
self.categoryName = categoryName
3640
self.categoryId = categoryId
3741
self.title = title
42+
self.memo = memo
3843
self.thumbNail = thumbNail
3944
self.data = data
4045
self.domain = domain
4146
self.createdAt = createdAt
4247
self.isRead = isRead
48+
self.isFavorite = isFavorite
4349
}
4450
}

Projects/Domain/Sources/CategorySharing/CategorySharing.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,11 @@ extension CategorySharing {
6363
public let data: String
6464
public let domain: String
6565
public let title: String
66-
public let memo: String
66+
public let memo: String?
6767
public let thumbNail: String
6868
public let createdAt: String
6969
public let categoryName: String
7070
public let isRead: Bool? = false
71+
public let isFavorite: Bool? = false
7172
}
7273
}

Projects/Domain/Sources/DTO/Base/BaseContentResponse+Extension.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ public extension ContentBaseResponse {
1717
categoryName: self.category.categoryName,
1818
categoryId: self.category.categoryId,
1919
title: self.title,
20+
memo: self.memo,
2021
thumbNail: self.thumbNail,
2122
data: self.data,
2223
domain: self.domain,
2324
createdAt: self.createdAt,
24-
isRead: self.isRead
25+
isRead: self.isRead,
26+
isFavorite: self.isFavorite
2527
)
2628
}
2729
}

Projects/Feature/FeatureCategorySharing/Sources/CategorySharing/CategorySharingFeature.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,13 @@ private extension CategorySharingFeature {
152152
categoryName: content.categoryName,
153153
categoryId: state.category.categoryId,
154154
title: content.title,
155+
memo: content.memo,
155156
thumbNail: content.thumbNail,
156157
data: content.data,
157158
domain: content.domain,
158159
createdAt: content.createdAt,
159-
isRead: content.isRead
160+
isRead: content.isRead,
161+
isFavorite: content.isFavorite
160162
)))
161163
}
162164
state.isLoading = false
@@ -176,11 +178,13 @@ private extension CategorySharingFeature {
176178
categoryName: content.categoryName,
177179
categoryId: state.category.categoryId,
178180
title: content.title,
181+
memo: content.memo,
179182
thumbNail: content.thumbNail,
180183
data: content.data,
181184
domain: content.domain,
182185
createdAt: content.createdAt,
183-
isRead: content.isRead
186+
isRead: content.isRead,
187+
isFavorite: content.isFavorite
184188
)))
185189
}
186190
state.isLoading = false

Projects/Util/Sources/Protocols/PokitLinkCardItem.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ import Foundation
99

1010
public protocol PokitLinkCardItem {
1111
var title: String { get }
12+
var memo: String? { get }
1213
var thumbNail: String { get }
1314
var createdAt: String { get }
1415
var categoryName: String { get }
1516
var isRead: Bool? { get }
1617
var data: String { get }
1718
var domain: String { get }
19+
var isFavorite: Bool? { get }
1820
}

0 commit comments

Comments
 (0)