Turned off the Location entity automatic code generation from the Model core data model in the Persistence library.
This commit is contained in:
parent
f718210180
commit
543417744b
@ -0,0 +1,21 @@
|
||||
//
|
||||
// Location+CoreDataClass.swift
|
||||
// Locations
|
||||
//
|
||||
// Created by Javier Cicchelli on 12/04/2023.
|
||||
// Copyright © 2023 Röck+Cöde. All rights reserved.
|
||||
//
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import CoreData
|
||||
|
||||
@objc(Location)
|
||||
public class Location: NSManagedObject {
|
||||
convenience init(context: NSManagedObjectContext) {
|
||||
self.init(
|
||||
entity: .entity(forEntityName: "Location", in: context)!,
|
||||
insertInto: context
|
||||
)
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
//
|
||||
// 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
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="21754" systemVersion="22E261" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
|
||||
<entity name="Location" representedClassName="Location" syncable="YES" codeGenerationType="class">
|
||||
<entity name="Location" representedClassName="Location" syncable="YES">
|
||||
<attribute name="createdAt" attributeType="Date" usesScalarValueType="NO"/>
|
||||
<attribute name="latitude" attributeType="Float" defaultValueString="0.0" usesScalarValueType="YES"/>
|
||||
<attribute name="longitude" attributeType="Float" defaultValueString="0.0" usesScalarValueType="YES"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user