AutoCat2/AutoCatCore/Models/vmodels/VPhoto.swift
2022-04-03 00:40:09 +03:00

30 lines
540 B
Swift

//
// 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
}
}