2022-12-11 20:53:44 +01:00
|
|
|
//
|
|
|
|
// User.swift
|
|
|
|
// DataModels
|
|
|
|
//
|
|
|
|
// Created by Javier Cicchelli on 11/12/2022.
|
|
|
|
// Copyright © 2022 Röck+Cöde. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
|
|
|
|
public struct User {
|
2022-12-11 21:12:25 +01:00
|
|
|
|
|
|
|
// MARK: Properties
|
|
|
|
|
2022-12-11 20:53:44 +01:00
|
|
|
public let profile: Profile
|
|
|
|
public let rootFolder: RootFolder
|
2022-12-11 21:12:25 +01:00
|
|
|
|
|
|
|
// MARK: Initialisers
|
|
|
|
|
|
|
|
public init(
|
|
|
|
profile: Profile,
|
|
|
|
rootFolder: RootFolder
|
|
|
|
) {
|
|
|
|
self.profile = profile
|
|
|
|
self.rootFolder = rootFolder
|
|
|
|
}
|
|
|
|
|
2022-12-11 20:53:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// MARK: - Structs
|
|
|
|
|
|
|
|
extension User {
|
|
|
|
public struct Profile {
|
2022-12-11 21:12:25 +01:00
|
|
|
|
|
|
|
// MARK: Properties
|
|
|
|
|
2022-12-11 20:53:44 +01:00
|
|
|
public let firstName: String
|
|
|
|
public let lastName: String
|
2022-12-11 21:12:25 +01:00
|
|
|
|
|
|
|
// MARK: Initialisers
|
|
|
|
|
|
|
|
public init(
|
|
|
|
firstName: String,
|
|
|
|
lastName: String
|
|
|
|
) {
|
|
|
|
self.firstName = firstName
|
|
|
|
self.lastName = lastName
|
|
|
|
}
|
|
|
|
|
2022-12-11 20:53:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public struct RootFolder {
|
2022-12-11 21:12:25 +01:00
|
|
|
|
|
|
|
// MARK: Properties
|
|
|
|
|
2022-12-11 20:53:44 +01:00
|
|
|
public let id: String
|
|
|
|
public let name: String
|
|
|
|
public let lastModifiedAt: Date
|
2022-12-11 21:12:25 +01:00
|
|
|
|
|
|
|
// MARK: Initialisers
|
|
|
|
|
|
|
|
public init(
|
|
|
|
id: String,
|
|
|
|
name: String,
|
|
|
|
lastModifiedAt: Date
|
|
|
|
) {
|
|
|
|
self.id = id
|
|
|
|
self.name = name
|
|
|
|
self.lastModifiedAt = lastModifiedAt
|
|
|
|
}
|
|
|
|
|
2022-12-11 20:53:44 +01:00
|
|
|
}
|
|
|
|
}
|