55 lines
1.5 KiB
Swift
55 lines
1.5 KiB
Swift
//
|
|
// VehicleOwnershipPeriodDto.swift
|
|
// AutoCatCore
|
|
//
|
|
// Created by Selim Mustafaev on 12.06.2024.
|
|
// Copyright © 2024 Selim Mustafaev. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct VehicleOwnershipPeriodDto: Codable, Sendable, Equatable, Hashable {
|
|
|
|
public var lastOperation: String = ""
|
|
public var ownerType: String = ""
|
|
public var from: Int64 = 0
|
|
public var to: Int64 = 0
|
|
public var region: String?
|
|
public var registrationRegion: String?
|
|
public var locality: String?
|
|
public var code: String?
|
|
public var street: String?
|
|
public var building: String?
|
|
public var inn: String?
|
|
|
|
public init(lastOperation: String,
|
|
ownerType: String,
|
|
from: Int64,
|
|
to: Int64,
|
|
region: String? = nil,
|
|
registrationRegion: String? = nil,
|
|
locality: String? = nil,
|
|
code: String? = nil,
|
|
street: String? = nil,
|
|
building: String? = nil,
|
|
inn: String? = nil) {
|
|
|
|
self.lastOperation = lastOperation
|
|
self.ownerType = ownerType
|
|
self.from = from
|
|
self.to = to
|
|
self.region = region
|
|
self.registrationRegion = registrationRegion
|
|
self.locality = locality
|
|
self.code = code
|
|
self.street = street
|
|
self.building = building
|
|
self.inn = inn
|
|
}
|
|
}
|
|
|
|
extension VehicleOwnershipPeriodDto: Identifiable {
|
|
|
|
public var id: Int64 { from }
|
|
}
|