-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRoutineResponseDTO.swift
More file actions
41 lines (37 loc) · 1.08 KB
/
RoutineResponseDTO.swift
File metadata and controls
41 lines (37 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// RoutineResponseDTO.swift
// DataSource
//
// Created by 최정인 on 7/30/25.
//
import Domain
struct RoutineDictionaryDTO: Decodable {
let routines: [String: [RoutineResponseDTO]]
}
struct RoutineResponseDTO: Decodable {
let routineId: String
let historySeq: Int
let routineName: String
let repeatDay: [String]?
let executionTime: String
let subRoutineSearchResultDto: [SubRoutineResponseDTO]
let modifiedYn: Bool
let routineCompletionId: Int?
let completeYn: Bool
let routineType: String
}
extension RoutineResponseDTO {
func toRoutineEntity() -> RoutineEntity {
return RoutineEntity(
routineId: routineId,
historySeq: historySeq,
routineName: routineName,
repeatDay: repeatDay,
executionTime: executionTime,
subRoutineSearchResultDto: subRoutineSearchResultDto.map({ $0.toSubRoutineEntity() }),
modifiedYn: modifiedYn,
routineCompletionId: routineCompletionId,
completeYn: completeYn,
routineType: routineType)
}
}