diff Simoleon/Models/CurrencyQuoteModel.swift @ 0:e0c2bda6c51f

first commit
author Dennis Concepción Martín <dennisconcepcionmartin@gmail.com>
date Sun, 11 Jul 2021 15:13:29 +0100
parents
children a62e5e4a4f02
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Simoleon/Models/CurrencyQuoteModel.swift	Sun Jul 11 15:13:29 2021 +0100
@@ -0,0 +1,24 @@
+//
+//  CurrencyQuoteModel.swift
+//  Simoleon
+//
+//  Created by Dennis Concepción Martín on 11/07/2021.
+//
+
+import SwiftUI
+
+struct CurrencyQuoteModel: Codable {
+    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"
+    }
+}