Skip to content

Commit 357afa3

Browse files
committed
✨[feat]: 출석 조회와 관련된 response model 추가 DDD-Community#30
1 parent 6572567 commit 357afa3

File tree

5 files changed

+101
-0
lines changed

5 files changed

+101
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
//
2+
// AttendanceListResponse.swift
3+
// DDDAttendance
4+
//
5+
// Created by eunpyo on 4/13/25.
6+
//
7+
8+
import Foundation
9+
10+
public struct AttendanceDetailResponseDTO: Decodable {
11+
let id: String
12+
let user: Int
13+
let userId: Int
14+
let userName: String
15+
let schedule: String
16+
let scheduleTitle: String
17+
let status: AttendanceStatusResponse
18+
let updatedAt: String
19+
let method: AttendanceMethodResponse?
20+
let note: String?
21+
22+
enum CodingKeys: String, CodingKey {
23+
case id
24+
case user
25+
case userId = "user_id"
26+
case userName = "user_name"
27+
case schedule
28+
case scheduleTitle = "schedule_title"
29+
case status
30+
case updatedAt = "updated_at"
31+
case method
32+
case note
33+
}
34+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//
2+
// AttendanceMethodResponse.swift
3+
// DDDAttendance
4+
//
5+
// Created by eunpyo on 4/13/25.
6+
//
7+
8+
import Foundation
9+
10+
public enum AttendanceMethodResponse: String, Decodable {
11+
case qr
12+
case manual
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//
2+
// AttendanceStatus.swift
3+
// DDDAttendance
4+
//
5+
// Created by eunpyo on 4/13/25.
6+
//
7+
8+
import Foundation
9+
10+
public enum AttendanceStatusResponse: String, Decodable {
11+
case tbd
12+
case present
13+
case late
14+
case absent
15+
case exception
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//
2+
// ScheduleListResponseDTO.swift
3+
// DDDAttendance
4+
//
5+
// Created by eunpyo on 4/13/25.
6+
//
7+
8+
import Foundation
9+
10+
public struct ScheduleListResponseDTO: Decodable {
11+
let schedules: [ScheduleResponse]
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
//
2+
// ScheduleResponse.swift
3+
// DDDAttendance
4+
//
5+
// Created by eunpyo on 4/13/25.
6+
//
7+
8+
import Foundation
9+
10+
public struct ScheduleResponse: Decodable {
11+
let id: String
12+
let title: String
13+
let description: String
14+
let startTime: String
15+
let endTime: String
16+
let createdAt: String
17+
18+
enum CodingKeys: String, CodingKey {
19+
case id
20+
case title
21+
case description
22+
case startTime = "start_time"
23+
case endTime = "end_time"
24+
case createdAt = "created_at"
25+
}
26+
}

0 commit comments

Comments
 (0)