Skip to content

Commit

Permalink
Add generated CoreData files
Browse files Browse the repository at this point in the history
  • Loading branch information
muthenberg committed Oct 10, 2024
1 parent 4cd8666 commit 3b6f0ae
Show file tree
Hide file tree
Showing 15 changed files with 462 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="22758" systemVersion="23G93" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
<entity name="Altitude" representedClassName="AltitudeMO" syncable="YES" codeGenerationType="class">
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="23231" systemVersion="23G93" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
<entity name="Altitude" representedClassName="AltitudeMO" syncable="YES">
<attribute name="altitude" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
<attribute name="time" attributeType="Date" usesScalarValueType="NO"/>
<relationship name="track" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Track" inverseName="altitudes" inverseEntity="Track"/>
</entity>
<entity name="Event" representedClassName="EventMO" syncable="YES" codeGenerationType="class">
<entity name="Event" representedClassName="EventMO" syncable="YES">
<attribute name="time" attributeType="Date" usesScalarValueType="NO"/>
<attribute name="type" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="value" optional="YES" attributeType="String"/>
<relationship name="measurement" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Measurement" inverseName="events" inverseEntity="Measurement"/>
</entity>
<entity name="GeoLocation" representedClassName="GeoLocationMO" syncable="YES" codeGenerationType="class">
<entity name="GeoLocation" representedClassName="GeoLocationMO" syncable="YES">
<attribute name="accuracy" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
<attribute name="altitude" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
<attribute name="lat" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
Expand All @@ -21,7 +21,7 @@
<attribute name="verticalAccuracy" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
<relationship name="track" maxCount="1" deletionRule="Nullify" destinationEntity="Track" inverseName="locations" inverseEntity="Track"/>
</entity>
<entity name="Measurement" representedClassName="MeasurementMO" syncable="YES" codeGenerationType="class">
<entity name="Measurement" representedClassName="MeasurementMO" syncable="YES">
<attribute name="identifier" attributeType="Integer 64" minValueString="0" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="synchronizable" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES"/>
<attribute name="synchronized" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
Expand All @@ -32,18 +32,18 @@
<fetchIndexElement property="identifier" type="Binary" order="ascending"/>
</fetchIndex>
</entity>
<entity name="Track" representedClassName="TrackMO" syncable="YES" codeGenerationType="class">
<entity name="Track" representedClassName="TrackMO" syncable="YES">
<relationship name="altitudes" toMany="YES" deletionRule="Cascade" ordered="YES" destinationEntity="Altitude" inverseName="track" inverseEntity="Altitude"/>
<relationship name="locations" toMany="YES" deletionRule="Cascade" ordered="YES" destinationEntity="GeoLocation" inverseName="track" inverseEntity="GeoLocation"/>
<relationship name="measurement" maxCount="1" deletionRule="Nullify" destinationEntity="Measurement" inverseName="tracks" inverseEntity="Measurement"/>
</entity>
<entity name="UploadSession" representedClassName="UploadSession" syncable="YES" codeGenerationType="class">
<entity name="UploadSession" representedClassName="UploadSession" syncable="YES">
<attribute name="location" optional="YES" attributeType="URI"/>
<attribute name="time" attributeType="Date" usesScalarValueType="NO"/>
<relationship name="measurement" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Measurement"/>
<relationship name="uploadProtocol" toMany="YES" deletionRule="Cascade" ordered="YES" destinationEntity="UploadTask" inverseName="uploadSession" inverseEntity="UploadTask"/>
</entity>
<entity name="UploadTask" representedClassName="UploadTask" syncable="YES" codeGenerationType="class">
<entity name="UploadTask" representedClassName="UploadTask" syncable="YES">
<attribute name="causedError" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
<attribute name="command" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="httpStatus" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// AltitudeMO+CoreDataClass.swift
// DataCapturing
//
// Created by Klemens Muthmann on 09.10.24.
//
//

import Foundation
import CoreData

@objc(AltitudeMO)
public class AltitudeMO: NSManagedObject {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//
// AltitudeMO+CoreDataProperties.swift
// DataCapturing
//
// Created by Klemens Muthmann on 09.10.24.
//
//

import Foundation
import CoreData


extension AltitudeMO {

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

@NSManaged public var altitude: Double
@NSManaged public var time: Date?
@NSManaged public var track: TrackMO?

}
15 changes: 15 additions & 0 deletions Sources/DataCapturing/Model/Generated/EventMO+CoreDataClass.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// EventMO+CoreDataClass.swift
// DataCapturing
//
// Created by Klemens Muthmann on 09.10.24.
//
//

import Foundation
import CoreData

@objc(EventMO)
public class EventMO: NSManagedObject {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// EventMO+CoreDataProperties.swift
// DataCapturing
//
// Created by Klemens Muthmann on 09.10.24.
//
//

import Foundation
import CoreData


extension EventMO {

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

@NSManaged public var time: Date?
@NSManaged public var type: Int16
@NSManaged public var value: String?
@NSManaged public var measurement: MeasurementMO?

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// GeoLocationMO+CoreDataClass.swift
// DataCapturing
//
// Created by Klemens Muthmann on 09.10.24.
//
//

import Foundation
import CoreData

@objc(GeoLocationMO)
public class GeoLocationMO: NSManagedObject {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//
// GeoLocationMO+CoreDataProperties.swift
// DataCapturing
//
// Created by Klemens Muthmann on 09.10.24.
//
//

import Foundation
import CoreData


extension GeoLocationMO {

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

@NSManaged public var accuracy: Double
@NSManaged public var altitude: Double
@NSManaged public var lat: Double
@NSManaged public var lon: Double
@NSManaged public var speed: Double
@NSManaged public var time: Date?
@NSManaged public var verticalAccuracy: Double
@NSManaged public var track: TrackMO?

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// MeasurementMO+CoreDataClass.swift
// DataCapturing
//
// Created by Klemens Muthmann on 09.10.24.
//
//

import Foundation
import CoreData

@objc(MeasurementMO)
public class MeasurementMO: NSManagedObject {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
//
// MeasurementMO+CoreDataProperties.swift
// DataCapturing
//
// Created by Klemens Muthmann on 09.10.24.
//
//

import Foundation
import CoreData


extension MeasurementMO {

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

@NSManaged public var identifier: Int64
@NSManaged public var synchronizable: Bool
@NSManaged public var synchronized: Bool
@NSManaged public var time: Date?
@NSManaged public var events: NSOrderedSet?
@NSManaged public var tracks: NSOrderedSet?

}

// MARK: Generated accessors for events
extension MeasurementMO {

@objc(insertObject:inEventsAtIndex:)
@NSManaged public func insertIntoEvents(_ value: EventMO, at idx: Int)

@objc(removeObjectFromEventsAtIndex:)
@NSManaged public func removeFromEvents(at idx: Int)

@objc(insertEvents:atIndexes:)
@NSManaged public func insertIntoEvents(_ values: [EventMO], at indexes: NSIndexSet)

@objc(removeEventsAtIndexes:)
@NSManaged public func removeFromEvents(at indexes: NSIndexSet)

@objc(replaceObjectInEventsAtIndex:withObject:)
@NSManaged public func replaceEvents(at idx: Int, with value: EventMO)

@objc(replaceEventsAtIndexes:withEvents:)
@NSManaged public func replaceEvents(at indexes: NSIndexSet, with values: [EventMO])

@objc(addEventsObject:)
@NSManaged public func addToEvents(_ value: EventMO)

@objc(removeEventsObject:)
@NSManaged public func removeFromEvents(_ value: EventMO)

@objc(addEvents:)
@NSManaged public func addToEvents(_ values: NSOrderedSet)

@objc(removeEvents:)
@NSManaged public func removeFromEvents(_ values: NSOrderedSet)

}

// MARK: Generated accessors for tracks
extension MeasurementMO {

@objc(insertObject:inTracksAtIndex:)
@NSManaged public func insertIntoTracks(_ value: TrackMO, at idx: Int)

@objc(removeObjectFromTracksAtIndex:)
@NSManaged public func removeFromTracks(at idx: Int)

@objc(insertTracks:atIndexes:)
@NSManaged public func insertIntoTracks(_ values: [TrackMO], at indexes: NSIndexSet)

@objc(removeTracksAtIndexes:)
@NSManaged public func removeFromTracks(at indexes: NSIndexSet)

@objc(replaceObjectInTracksAtIndex:withObject:)
@NSManaged public func replaceTracks(at idx: Int, with value: TrackMO)

@objc(replaceTracksAtIndexes:withTracks:)
@NSManaged public func replaceTracks(at indexes: NSIndexSet, with values: [TrackMO])

@objc(addTracksObject:)
@NSManaged public func addToTracks(_ value: TrackMO)

@objc(removeTracksObject:)
@NSManaged public func removeFromTracks(_ value: TrackMO)

@objc(addTracks:)
@NSManaged public func addToTracks(_ values: NSOrderedSet)

@objc(removeTracks:)
@NSManaged public func removeFromTracks(_ values: NSOrderedSet)

}
15 changes: 15 additions & 0 deletions Sources/DataCapturing/Model/Generated/TrackMO+CoreDataClass.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// TrackMO+CoreDataClass.swift
// DataCapturing
//
// Created by Klemens Muthmann on 09.10.24.
//
//

import Foundation
import CoreData

@objc(TrackMO)
public class TrackMO: NSManagedObject {

}
Loading

0 comments on commit 3b6f0ae

Please sign in to comment.