diff --git a/Projects/Data/Sources/DTO/WeekendMeal/WeekendMealPeriodDTO.swift b/Projects/Data/Sources/DTO/WeekendMeal/WeekendMealPeriodDTO.swift index d34f598..11a9426 100644 --- a/Projects/Data/Sources/DTO/WeekendMeal/WeekendMealPeriodDTO.swift +++ b/Projects/Data/Sources/DTO/WeekendMeal/WeekendMealPeriodDTO.swift @@ -11,10 +11,16 @@ public struct WeekendMealPeriodDTO: Decodable { extension WeekendMealPeriodDTO { func toDomain() -> WeekendMealPeriodEntity { + var weekendMealPeriod: String { + guard let start, let end else { return "" } + let startDate = start.toDate(type: .fullDate).toString(type: .monthAndDayKor) + let endDate = end.toDate(type: .fullDate).toString(type: .monthAndDayKor) + return "(\(startDate) ~ \(endDate))" + } + return .init( status: status, - start: start, - end: end + period: weekendMealPeriod ) } } diff --git a/Projects/Domain/Sources/Entity/WeekendMeal/WeekendMealPeriodEntity.swift b/Projects/Domain/Sources/Entity/WeekendMeal/WeekendMealPeriodEntity.swift index 05404c5..3257320 100644 --- a/Projects/Domain/Sources/Entity/WeekendMeal/WeekendMealPeriodEntity.swift +++ b/Projects/Domain/Sources/Entity/WeekendMeal/WeekendMealPeriodEntity.swift @@ -4,17 +4,11 @@ import Core public struct WeekendMealPeriodEntity { public let status: Bool - public let start: String? - public let end: String? + public let period: String - public init( - status: Bool, - start: String?, - end: String? - ) { + public init(status: Bool, period: String) { self.status = status - self.start = start - self.end = end + self.period = period } }