34 lines
643 B
Swift
34 lines
643 B
Swift
|
//
|
||
|
// Item.swift
|
||
|
// APIService
|
||
|
//
|
||
|
// Created by Javier Cicchelli on 03/12/2022.
|
||
|
// Copyright © 2022 Röck+Cöde. All rights reserved.
|
||
|
//
|
||
|
|
||
|
import Foundation
|
||
|
|
||
|
struct Item {
|
||
|
let idParent: String?
|
||
|
let id: String
|
||
|
let name: String
|
||
|
let isDirectory: Bool
|
||
|
let lastModifiedAt: Date
|
||
|
let size: Int?
|
||
|
let contentType: String?
|
||
|
}
|
||
|
|
||
|
// MARK: - Decodable
|
||
|
|
||
|
extension Item: Decodable {
|
||
|
enum CodingKeys: String, CodingKey {
|
||
|
case id
|
||
|
case idParent = "parentId"
|
||
|
case name
|
||
|
case isDirectory = "isDir"
|
||
|
case lastModifiedAt = "modificationDate"
|
||
|
case size
|
||
|
case contentType
|
||
|
}
|
||
|
}
|