From e925048aa84304f44b25a3e7b459f9df1fe93ab1 Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Mon, 10 Apr 2023 12:35:18 +0200 Subject: [PATCH] Implemented the Location model. --- .../Sources/Locations/Models/Location.swift | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Apps/Locations/Libraries/Sources/Locations/Models/Location.swift diff --git a/Apps/Locations/Libraries/Sources/Locations/Models/Location.swift b/Apps/Locations/Libraries/Sources/Locations/Models/Location.swift new file mode 100644 index 0000000..86fe12f --- /dev/null +++ b/Apps/Locations/Libraries/Sources/Locations/Models/Location.swift @@ -0,0 +1,23 @@ +// +// Location.swift +// Locations (Library) +// +// Created by Javier Cicchelli on 10/04/2023. +// Copyright © 2023 Röck+Cöde. All rights reserved. +// + +public struct Location { + public let name: String? + public let latitude: Float + public let longitude: Float +} + +// MARK: - Decodable + +extension Location: Decodable { + enum CodingKeys: String, CodingKey { + case name + case latitude = "lat" + case longitude = "long" + } +}