Tree with reordering and core data storage + undo

This commit is contained in:
relikd
2018-08-02 14:02:00 +02:00
parent 1de26a7a88
commit 6db2607105
8 changed files with 263 additions and 106 deletions

View File

@@ -10,8 +10,19 @@
<attribute name="published" optional="YES" attributeType="Transformable" customClassName="NSArray" syncable="YES"/>
<attribute name="subtitle" optional="YES" attributeType="String" syncable="YES"/>
<attribute name="title" optional="YES" attributeType="String" syncable="YES"/>
<relationship name="config" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="FeedConfig" inverseName="feed" inverseEntity="FeedConfig" syncable="YES"/>
<relationship name="items" optional="YES" toMany="YES" deletionRule="Cascade" ordered="YES" destinationEntity="FeedItem" inverseName="feed" inverseEntity="FeedItem" syncable="YES"/>
</entity>
<entity name="FeedConfig" representedClassName="FeedConfig" syncable="YES" codeGenerationType="class">
<attribute name="name" optional="YES" attributeType="String" syncable="YES"/>
<attribute name="refresh" optional="YES" attributeType="String" syncable="YES"/>
<attribute name="sortIndex" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
<attribute name="type" optional="YES" attributeType="Integer 16" defaultValueString="1" usesScalarValueType="YES" syncable="YES"/>
<attribute name="url" optional="YES" attributeType="String" syncable="YES"/>
<relationship name="children" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="FeedConfig" inverseName="parent" inverseEntity="FeedConfig" syncable="YES"/>
<relationship name="feed" optional="YES" maxCount="1" deletionRule="Cascade" destinationEntity="Feed" inverseName="config" inverseEntity="Feed" syncable="YES"/>
<relationship name="parent" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="FeedConfig" inverseName="children" inverseEntity="FeedConfig" syncable="YES"/>
</entity>
<entity name="FeedItem" representedClassName="FeedItem" syncable="YES" codeGenerationType="class">
<attribute name="author" optional="YES" attributeType="String" syncable="YES"/>
<attribute name="link" optional="YES" attributeType="String" syncable="YES"/>
@@ -27,8 +38,9 @@
<relationship name="feedItem" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="FeedItem" inverseName="tags" inverseEntity="FeedItem" syncable="YES"/>
</entity>
<elements>
<element name="FeedItem" positionX="-36" positionY="-36" width="128" height="165"/>
<element name="FeedTag" positionX="0" positionY="54" width="128" height="75"/>
<element name="Feed" positionX="27" positionY="9" width="128" height="195"/>
<element name="Feed" positionX="-209" positionY="-3" width="128" height="210"/>
<element name="FeedConfig" positionX="-20" positionY="-126" width="128" height="165"/>
<element name="FeedItem" positionX="-20" positionY="81" width="128" height="165"/>
<element name="FeedTag" positionX="187" positionY="171" width="128" height="75"/>
</elements>
</model>