44 lines
1.0 KiB
Swift
44 lines
1.0 KiB
Swift
//
|
|
// VOwnershipPeriod.swift
|
|
// AutoCatCore
|
|
//
|
|
// Created by Selim Mustafaev on 02.04.2022.
|
|
//
|
|
|
|
import Foundation
|
|
import CoreData
|
|
|
|
public struct VOwnershipPeriod: Decodable {
|
|
|
|
let lastOperation: String?
|
|
let ownerType: String?
|
|
let from: Int64?
|
|
let to: Int64?
|
|
let region: String?
|
|
let registrationRegion: String?
|
|
let locality: String?
|
|
let code: String?
|
|
let street: String?
|
|
let building: String?
|
|
let inn: String?
|
|
}
|
|
|
|
extension CDVOwnershipPeriod {
|
|
|
|
convenience init(model: VOwnershipPeriod?, context: NSManagedObjectContext) {
|
|
self.init(context: context)
|
|
|
|
self.lastOperation = model?.lastOperation
|
|
self.ownerType = model?.ownerType
|
|
self.from = model?.from ?? 0
|
|
self.to = model?.to ?? 0
|
|
self.region = model?.region
|
|
self.registrationRegion = model?.registrationRegion
|
|
self.locality = model?.locality
|
|
self.code = model?.locality
|
|
self.street = model?.street
|
|
self.building = model?.building
|
|
self.inn = model?.inn
|
|
}
|
|
}
|