Untitled

mail@pastecode.io avatar
unknown
swift
6 months ago
668 B
3
Indexable
Never
struct CalenderResponse: Codable {
    let status: Bool
    let message: String
    let data: CalenderDataClass
}

struct CalenderDataClass: Codable {
    let year: Int
    let listOfHistoryLeave: [ListOfHistoryLeave]

    enum CodingKeys: String, CodingKey {
        case year
        case listOfHistoryLeave = "list_of_history_leave"
    }
}

struct ListOfHistoryLeave: Codable {
    let month: Int
    let leaveDate: [LeaveDay]

    enum CodingKeys: String, CodingKey {
        case month
        case leaveDate = "leave_date"
    }
}

struct LeaveDay: Codable {
    let leaveID: Int
    let startDate, startType, endDate, endType: String
    let duration: Double
}
Leave a Comment