view Simoleon/Models/CurrencyQuoteModel.swift @ 11:a62e5e4a4f02

Implementing networking
author Dennis Concepción Martín <dennisconcepcionmartin@gmail.com>
date Tue, 13 Jul 2021 12:14:42 +0100
parents e0c2bda6c51f
children aec2e86e5dbd
line wrap: on
line source

//
//  CurrencyQuoteModel.swift
//  Simoleon
//
//  Created by Dennis Concepción Martín on 11/07/2021.
//

import SwiftUI

struct CurrencyQuoteModel: Codable, Hashable {
    var id: UUID?
    var symbol: String?
    var price: Float?
    var bid: Float?
    var ask: Float?
    var timeStamp: Int?
    
    private enum CodingKeys: String, CodingKey {
        case symbol = "s"
        case price = "p"
        case bid = "b"
        case ask = "a"
        case timeStamp = "t"
    }
}
extension CurrencyQuoteModel: Identifiable {}