// // VPhoto.swift // AutoCatCore // // Created by Selim Mustafaev on 02.04.2022. // import Foundation import CoreData public struct VPhoto: Decodable { let brand: String? let model: String? let date: Double let url: String? } extension CDVPhoto { convenience init(model: VPhoto?, context: NSManagedObjectContext) { self.init(context: context) self.brand = model?.brand self.model = model?.model self.date = model?.date ?? 0 self.url = model?.url } }