<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="22757" systemVersion="23B74" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
    <entity name="CanvasObject" representedClassName="CanvasObject" syncable="YES">
        <attribute name="gridMode" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
        <attribute name="height" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES" customClassName="CGFloat"/>
        <attribute name="width" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES" customClassName="CGFloat"/>
        <relationship name="graphicContext" optional="YES" maxCount="1" deletionRule="Cascade" destinationEntity="GraphicContextObject" inverseName="canvas" inverseEntity="GraphicContextObject"/>
        <relationship name="memo" maxCount="1" deletionRule="Deny" destinationEntity="MemoObject" inverseName="canvas" inverseEntity="MemoObject"/>
    </entity>
    <entity name="ElementObject" representedClassName="ElementObject" syncable="YES">
        <attribute name="createdAt" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="type" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
        <relationship name="graphicContext" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="GraphicContextObject" inverseName="elements" inverseEntity="GraphicContextObject"/>
        <relationship name="photo" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="PhotoObject" inverseName="element" inverseEntity="PhotoObject"/>
        <relationship name="stroke" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="StrokeObject" inverseName="element" inverseEntity="StrokeObject"/>
    </entity>
    <entity name="EraserObject" representedClassName="EraserObject" syncable="YES">
        <attribute name="bounds" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromDataTransformer" customClassName="[CGFloat]"/>
        <attribute name="color" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromDataTransformer" customClassName="[CGFloat]"/>
        <attribute name="createdAt" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="style" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
        <attribute name="thickness" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
        <relationship name="quads" toMany="YES" deletionRule="Cascade" ordered="YES" destinationEntity="QuadObject" inverseName="eraser" inverseEntity="QuadObject"/>
        <relationship name="strokes" toMany="YES" deletionRule="Nullify" destinationEntity="StrokeObject" inverseName="erasers" inverseEntity="StrokeObject"/>
    </entity>
    <entity name="GraphicContextObject" representedClassName="GraphicContextObject" syncable="YES">
        <relationship name="canvas" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="CanvasObject" inverseName="graphicContext" inverseEntity="CanvasObject"/>
        <relationship name="elements" toMany="YES" deletionRule="Cascade" ordered="YES" destinationEntity="ElementObject" inverseName="graphicContext" inverseEntity="ElementObject"/>
        <relationship name="files" optional="YES" toMany="YES" deletionRule="Cascade" ordered="YES" destinationEntity="PhotoFileObject" inverseName="graphicContext" inverseEntity="PhotoFileObject"/>
    </entity>
    <entity name="MemoObject" representedClassName="MemoObject" syncable="YES">
        <attribute name="createdAt" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="deletedAt" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="isFavorite" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
        <attribute name="isTrash" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
        <attribute name="preview" optional="YES" attributeType="Binary" allowsExternalBinaryDataStorage="YES"/>
        <attribute name="title" attributeType="String"/>
        <attribute name="updatedAt" attributeType="Date" usesScalarValueType="NO"/>
        <relationship name="canvas" maxCount="1" deletionRule="Cascade" destinationEntity="CanvasObject" inverseName="memo" inverseEntity="CanvasObject"/>
        <relationship name="tool" maxCount="1" deletionRule="Cascade" destinationEntity="ToolObject" inverseName="memo" inverseEntity="ToolObject"/>
    </entity>
    <entity name="PenObject" representedClassName="PenObject" syncable="YES">
        <attribute name="color" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromDataTransformer" customClassName="[CGFloat]"/>
        <attribute name="isSelected" attributeType="Boolean" usesScalarValueType="YES"/>
        <attribute name="orderIndex" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
        <attribute name="style" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
        <attribute name="thickness" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
        <relationship name="tool" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="ToolObject" inverseName="pens" inverseEntity="ToolObject"/>
    </entity>
    <entity name="PhotoFileObject" representedClassName="PhotoFileObject" syncable="YES">
        <attribute name="bookmark" optional="YES" attributeType="Binary"/>
        <attribute name="createdAt" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="dimension" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromDataTransformer" customClassName="[CGFloat]"/>
        <attribute name="imageURL" optional="YES" attributeType="URI"/>
        <relationship name="graphicContext" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="GraphicContextObject" inverseName="files" inverseEntity="GraphicContextObject"/>
        <relationship name="photos" toMany="YES" deletionRule="Cascade" destinationEntity="PhotoObject" inverseName="file" inverseEntity="PhotoObject"/>
    </entity>
    <entity name="PhotoObject" representedClassName="PhotoObject" syncable="YES">
        <attribute name="bookmark" optional="YES" attributeType="Binary"/>
        <attribute name="bounds" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromDataTransformer" customClassName="[CGFloat]"/>
        <attribute name="createdAt" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="height" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
        <attribute name="imageURL" optional="YES" attributeType="URI"/>
        <attribute name="originX" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
        <attribute name="originY" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
        <attribute name="width" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
        <relationship name="element" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="ElementObject" inverseName="photo" inverseEntity="ElementObject"/>
        <relationship name="file" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="PhotoFileObject" inverseName="photos" inverseEntity="PhotoFileObject"/>
    </entity>
    <entity name="QuadObject" representedClassName="QuadObject" syncable="YES">
        <attribute name="color" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromDataTransformer" customClassName="[CGFloat]"/>
        <attribute name="originX" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
        <attribute name="originY" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
        <attribute name="rotation" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
        <attribute name="shape" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
        <attribute name="size" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
        <relationship name="eraser" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="EraserObject" inverseName="quads" inverseEntity="EraserObject"/>
        <relationship name="stroke" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="StrokeObject" inverseName="quads" inverseEntity="StrokeObject"/>
    </entity>
    <entity name="StrokeObject" representedClassName="StrokeObject" syncable="YES">
        <attribute name="bounds" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromDataTransformer" customClassName="[CGFloat]"/>
        <attribute name="color" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromDataTransformer" customClassName="[CGFloat]"/>
        <attribute name="createdAt" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="style" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
        <attribute name="thickness" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
        <relationship name="element" maxCount="1" deletionRule="Nullify" destinationEntity="ElementObject" inverseName="stroke" inverseEntity="ElementObject"/>
        <relationship name="erasers" toMany="YES" deletionRule="Nullify" destinationEntity="EraserObject" inverseName="strokes" inverseEntity="EraserObject"/>
        <relationship name="quads" toMany="YES" deletionRule="Cascade" ordered="YES" destinationEntity="QuadObject" inverseName="stroke" inverseEntity="QuadObject"/>
    </entity>
    <entity name="ToolObject" representedClassName="ToolObject" syncable="YES">
        <attribute name="selection" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
        <relationship name="memo" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="MemoObject" inverseName="tool" inverseEntity="MemoObject"/>
        <relationship name="pens" toMany="YES" deletionRule="Cascade" destinationEntity="PenObject" inverseName="tool" inverseEntity="PenObject"/>
    </entity>
</model>