Kaynağa Gözat

Remove uuidString

Jon Mårtensson 3 yıl önce
ebeveyn
işleme
a534639478

+ 1 - 2
Core_Data.xcdatamodeld/Core_Data.xcdatamodel/contents

@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="21513" systemVersion="22D5027d" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
+<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="21513" systemVersion="22C65" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
     <entity name="TDD" representedClassName="TDD" syncable="YES" codeGenerationType="class">
-        <attribute name="id" optional="YES" attributeType="String"/>
         <attribute name="tdd" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
         <attribute name="timestamp" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
     </entity>

+ 2 - 2
FreeAPS.xcworkspace/contents.xcworkspacedata

@@ -2,10 +2,10 @@
 <Workspace
    version = "1.0">
    <FileRef
-      location = "group:FreeAPS/Sources/Models/TDD+CoreDataClass.swift">
+      location = "group:TDD+CoreDataClass.swift">
    </FileRef>
    <FileRef
-      location = "group:FreeAPS/Sources/Models/TDD+CoreDataProperties.swift">
+      location = "group:TDD+CoreDataProperties.swift">
    </FileRef>
    <FileRef
       location = "group:FreeAPS/Sources/Helpers/CoreDataStack.swift">

+ 2 - 3
FreeAPS/Sources/APS/APSManager.swift

@@ -689,9 +689,8 @@ final class BaseAPSManager: APSManager, Injectable {
         // MARK: Add new data to Core Data:TDD Entity
 
         let nTDD = TDD(context: coredataContext)
-        nTDD.id = UUID().uuidString
-        nTDD.timestamp = Date()
-        nTDD.tdd = NSDecimalNumber(decimal: currentTDD)
+            nTDD.timestamp = Date()
+            nTDD.tdd = NSDecimalNumber(decimal: currentTDD)
         try? coredataContext.save()
 
         let twoWeeksAgo = Date().addingTimeInterval(-14.days.timeInterval)

FreeAPS/Sources/Models/TDD+CoreDataClass.swift → TDD+CoreDataClass.swift


+ 0 - 1
FreeAPS/Sources/Models/TDD+CoreDataProperties.swift

@@ -8,5 +8,4 @@ public extension TDD {
 
     @NSManaged var tdd: NSDecimalNumber?
     @NSManaged var timestamp: Date?
-    @NSManaged var id: String?
 }