<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11232" systemVersion="16A323" minimumToolsVersion="Xcode 7.3" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier="1.8">
    <entity name="Article" representedClassName=".Article" syncable="YES">
        <attribute name="bookmarkDate" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
        <attribute name="isBookmarked" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
        <attribute name="isMainPage" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
        <attribute name="lastPosition" optional="YES" attributeType="Double" usesScalarValueType="YES" syncable="YES"/>
        <attribute name="lastReadDate" optional="YES" attributeType="Date" usesScalarValueType="NO" indexed="YES" syncable="YES"/>
        <attribute name="needsUpdate" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
        <attribute name="path" attributeType="String" syncable="YES"/>
        <attribute name="snippet" optional="YES" attributeType="String" syncable="YES"/>
        <attribute name="thumbImageURL" optional="YES" attributeType="String" syncable="YES"/>
        <attribute name="title" attributeType="String" syncable="YES"/>
        <relationship name="book" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Book" inverseName="articles" inverseEntity="Book" syncable="YES"/>
        <relationship name="tags" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Tag" inverseName="articles" inverseEntity="Tag" syncable="YES"/>
    </entity>
    <entity name="Book" representedClassName=".Book" syncable="YES">
        <attribute name="articleCount" optional="YES" attributeType="Integer 64" minValueString="0" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
        <attribute name="creator" optional="YES" attributeType="String" syncable="YES"/>
        <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
        <attribute name="desc" optional="YES" attributeType="String" syncable="YES"/>
        <attribute name="favIcon" optional="YES" attributeType="Binary" syncable="YES"/>
        <attribute name="fileSize" optional="YES" attributeType="Integer 64" minValueString="0" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
        <attribute name="globalCount" optional="YES" attributeType="Integer 64" minValueString="0" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
        <attribute name="hasIndex" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
        <attribute name="hasPic" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
        <attribute name="id" attributeType="String" syncable="YES"/>
        <attribute name="includeInSearch" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES" syncable="YES"/>
        <attribute name="mediaCount" optional="YES" attributeType="Integer 64" minValueString="0" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
        <attribute name="meta4URL" optional="YES" attributeType="String" syncable="YES"/>
        <attribute name="pid" optional="YES" attributeType="String" syncable="YES"/>
        <attribute name="publisher" optional="YES" attributeType="String" syncable="YES"/>
        <attribute name="stateRaw" attributeType="Integer 16" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
        <attribute name="title" optional="YES" attributeType="String" indexed="YES" syncable="YES"/>
        <relationship name="articles" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Article" inverseName="book" inverseEntity="Article" syncable="YES"/>
        <relationship name="downloadTask" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="DownloadTask" inverseName="book" inverseEntity="DownloadTask" syncable="YES"/>
        <relationship name="language" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Language" inverseName="books" inverseEntity="Language" syncable="YES"/>
        <compoundIndexes>
            <compoundIndex>
                <index value="id"/>
            </compoundIndex>
            <compoundIndex>
                <index value="pid"/>
            </compoundIndex>
        </compoundIndexes>
        <uniquenessConstraints>
            <uniquenessConstraint>
                <constraint value="id"/>
            </uniquenessConstraint>
        </uniquenessConstraints>
    </entity>
    <entity name="DownloadTask" representedClassName=".DownloadTask" syncable="YES">
        <attribute name="creationTime" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
        <attribute name="stateRaw" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
        <attribute name="totalBytesWritten" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
        <relationship name="book" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Book" inverseName="downloadTask" inverseEntity="Book" syncable="YES"/>
        <uniquenessConstraints>
            <uniquenessConstraint>
                <constraint value="creationTime"/>
            </uniquenessConstraint>
        </uniquenessConstraints>
    </entity>
    <entity name="Language" representedClassName=".Language" syncable="YES">
        <attribute name="code" attributeType="String" syncable="YES"/>
        <attribute name="isDisplayed" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
        <attribute name="name" optional="YES" attributeType="String" syncable="YES"/>
        <relationship name="books" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Book" inverseName="language" inverseEntity="Book" syncable="YES"/>
        <compoundIndexes>
            <compoundIndex>
                <index value="code"/>
            </compoundIndex>
        </compoundIndexes>
        <uniquenessConstraints>
            <uniquenessConstraint>
                <constraint value="code"/>
            </uniquenessConstraint>
        </uniquenessConstraints>
    </entity>
    <entity name="Tag" representedClassName=".Tag" syncable="YES">
        <attribute name="name" optional="YES" attributeType="String" syncable="YES"/>
        <relationship name="articles" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Article" inverseName="tags" inverseEntity="Article" syncable="YES"/>
    </entity>
    <elements>
        <element name="Article" positionX="-657" positionY="-153" width="128" height="225"/>
        <element name="Book" positionX="-947" positionY="-142" width="128" height="345"/>
        <element name="DownloadTask" positionX="-657" positionY="90" width="128" height="105"/>
        <element name="Language" positionX="-657" positionY="216" width="128" height="103"/>
        <element name="Tag" positionX="-425" positionY="-18" width="128" height="73"/>
    </elements>
</model>