-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(pluto): add core data model and entities
Fixes ATL-2356
- Loading branch information
1 parent
f48d3ff
commit 0aa9fa0
Showing
5 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
Pluto/Sources/PersistentStorage/Models/CDDID+CoreDataClass.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import CoreData | ||
import Foundation | ||
|
||
@objc(CDDID) | ||
public class CDDID: NSManagedObject {} |
17 changes: 17 additions & 0 deletions
17
Pluto/Sources/PersistentStorage/Models/CDDID+CoreDataProperties.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 } | ||
} |
5 changes: 5 additions & 0 deletions
5
Pluto/Sources/PersistentStorage/Models/CDRegisteredDID+CoreDataClass.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import CoreData | ||
import Foundation | ||
|
||
@objc(CDRegisteredDID) | ||
class CDRegisteredDID: CDDID {} |
11 changes: 11 additions & 0 deletions
11
Pluto/Sources/PersistentStorage/Models/CDRegisteredDID+CoreDataProperties.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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? | ||
} |
13 changes: 13 additions & 0 deletions
13
Pluto/Sources/Resources/PrismPluto.xcdatamodeld/PrismPluto.xcdatamodel/contents
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |