import Foundation final class FileResource: ObservableObject { /// Globally unique id @Published var uniqueId: String @Published var description: String init(uniqueId: String, description: String) { self.uniqueId = uniqueId self.description = description } } extension FileResource: Identifiable { var id: String { uniqueId } } extension FileResource: Equatable { static func == (lhs: FileResource, rhs: FileResource) -> Bool { lhs.uniqueId == rhs.uniqueId } } extension FileResource: Hashable { func hash(into hasher: inout Hasher) { hasher.combine(uniqueId) } }