Skip to content

Commit

Permalink
feat(pluto): add core data model and entities
Browse files Browse the repository at this point in the history
Fixes ATL-2356
  • Loading branch information
goncalo-frade-iohk committed Nov 27, 2022
1 parent f48d3ff commit 0aa9fa0
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import CoreData
import Foundation

@objc(CDDID)
public class CDDID: NSManagedObject {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import CoreData
import Foundation

public extension CDDID {
@nonobjc class func createFetchRequest() -> NSFetchRequest<CDDID> {
return NSFetchRequest<CDDID>(entityName: "CDDID")
}

@NSManaged var did: String
@NSManaged var schema: String
@NSManaged var method: String
@NSManaged var methodId: String
}

extension CDDID: Identifiable {
public var id: String { did }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import CoreData
import Foundation

@objc(CDRegisteredDID)
class CDRegisteredDID: CDDID {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import CoreData
import Foundation

extension CDRegisteredDID {
@nonobjc class func createFetchRequest() -> NSFetchRequest<CDRegisteredDID> {
return NSFetchRequest<CDRegisteredDID>(entityName: "CDRegisteredDID")
}

@NSManaged var keyIndex: Int64
@NSManaged var alias: String?
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="21279" systemVersion="21G83" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
<entity name="CDDID" representedClassName="CDDID" isAbstract="YES" syncable="YES">
<attribute name="did" optional="YES" attributeType="String"/>
<attribute name="method" attributeType="String"/>
<attribute name="methodId" attributeType="String"/>
<attribute name="schema" attributeType="String"/>
</entity>
<entity name="CDRegisteredDID" representedClassName="CDRegisteredDID" parentEntity="CDDID" syncable="YES">
<attribute name="alias" optional="YES" attributeType="String"/>
<attribute name="keyIndex" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO"/>
</entity>
</model>

0 comments on commit 0aa9fa0

Please sign in to comment.