//
//  Location+CoreDataProperties.swift
//  Locations
//
//  Created by Javier Cicchelli on 12/04/2023.
//  Copyright © 2023 Röck+Cöde. All rights reserved.
//
//

import Foundation
import CoreData

extension Location {

    @nonobjc public class func fetchRequest() -> NSFetchRequest<Location> {
        return NSFetchRequest<Location>(entityName: "Location")
    }

    @NSManaged public var createdAt: Date
    @NSManaged public var latitude: Float
    @NSManaged public var longitude: Float
    @NSManaged public var name: String?
    @NSManaged public var source: LocationSource

}

// MARK: - Identifiable

extension Location: Identifiable {}

// MARK: - Enumerations

@objc public enum LocationSource: Int16 {
    case remote = 0
    case local
}
