<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="22522" systemVersion="23F79" minimumToolsVersion="Automatic" sourceLanguage="Swift" usedWithCloudKit="YES" userDefinedModelVersionIdentifier="">
    <entity name="AppSettings" representedClassName="AppSettings" syncable="YES">
        <attribute name="createdAt" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="currency" attributeType="String" defaultValueString="EUR"/>
        <attribute name="defaultNotificationTime" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="enableAnalytics" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES"/>
        <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
        <attribute name="inputMode" attributeType="String" defaultValueString="simple"/>
        <attribute name="lastSyncDate" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="onboardingCompleted" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
        <attribute name="selectedAccountId" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
        <attribute name="showAllAccounts" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES"/>
    </entity>
    <entity name="Account" representedClassName="Account" syncable="YES">
        <attribute name="createdAt" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="currency" optional="YES" attributeType="String"/>
        <attribute name="customFrequencyMonths" attributeType="Integer 16" defaultValueString="1" usesScalarValueType="YES"/>
        <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
        <attribute name="inputMode" attributeType="String" defaultValueString="simple"/>
        <attribute name="name" attributeType="String" defaultValueString=""/>
        <attribute name="notificationFrequency" attributeType="String" defaultValueString="monthly"/>
        <attribute name="sortOrder" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
        <relationship name="goals" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Goal" inverseName="account" inverseEntity="Goal"/>
        <relationship name="sources" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="InvestmentSource" inverseName="account" inverseEntity="InvestmentSource"/>
    </entity>
    <entity name="Category" representedClassName="Category" syncable="YES">
        <attribute name="allocationTarget" optional="YES" attributeType="Double" usesScalarValueType="NO"/>
        <attribute name="colorHex" attributeType="String" defaultValueString="#3B82F6"/>
        <attribute name="createdAt" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="icon" attributeType="String" defaultValueString="chart.pie.fill"/>
        <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
        <attribute name="name" attributeType="String" defaultValueString=""/>
        <attribute name="sortOrder" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
        <relationship name="sources" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="InvestmentSource" inverseName="category" inverseEntity="InvestmentSource"/>
    </entity>
    <entity name="InvestmentSource" representedClassName="InvestmentSource" syncable="YES">
        <attribute name="createdAt" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="customFrequencyMonths" attributeType="Integer 16" defaultValueString="1" usesScalarValueType="YES"/>
        <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
        <attribute name="isActive" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES"/>
        <attribute name="monthlyContribution" optional="YES" attributeType="Decimal"/>
        <attribute name="name" attributeType="String" defaultValueString=""/>
        <attribute name="notificationFrequency" attributeType="String" defaultValueString="monthly"/>
        <relationship name="account" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Account" inverseName="sources" inverseEntity="Account"/>
        <relationship name="asset" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Asset" inverseName="sources" inverseEntity="Asset"/>
        <relationship name="category" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Category" inverseName="sources" inverseEntity="Category"/>
        <relationship name="snapshots" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Snapshot" inverseName="source" inverseEntity="Snapshot"/>
        <relationship name="transactions" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Transaction" inverseName="source" inverseEntity="Transaction"/>
    </entity>
    <entity name="Asset" representedClassName="Asset" syncable="YES">
        <attribute name="createdAt" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="currency" optional="YES" attributeType="String"/>
        <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
        <attribute name="name" attributeType="String" defaultValueString=""/>
        <attribute name="symbol" optional="YES" attributeType="String"/>
        <attribute name="type" attributeType="String" defaultValueString="stock"/>
        <relationship name="sources" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="InvestmentSource" inverseName="asset" inverseEntity="InvestmentSource"/>
    </entity>
    <entity name="Transaction" representedClassName="Transaction" syncable="YES">
        <attribute name="amount" optional="YES" attributeType="Decimal"/>
        <attribute name="createdAt" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
        <attribute name="notes" optional="YES" attributeType="String"/>
        <attribute name="price" optional="YES" attributeType="Decimal"/>
        <attribute name="shares" optional="YES" attributeType="Decimal"/>
        <attribute name="type" attributeType="String" defaultValueString="buy"/>
        <relationship name="source" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="InvestmentSource" inverseName="transactions" inverseEntity="InvestmentSource"/>
    </entity>
    <entity name="Goal" representedClassName="Goal" syncable="YES">
        <attribute name="createdAt" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
        <attribute name="isActive" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES"/>
        <attribute name="name" attributeType="String" defaultValueString=""/>
        <attribute name="targetAmount" optional="YES" attributeType="Decimal"/>
        <attribute name="targetDate" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <relationship name="account" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Account" inverseName="goals" inverseEntity="Account"/>
    </entity>
    <entity name="PredictionCache" representedClassName="PredictionCache" syncable="NO">
        <attribute name="algorithm" attributeType="String" defaultValueString="linear"/>
        <attribute name="calculatedAt" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
        <attribute name="predictionData" optional="YES" attributeType="Binary"/>
        <attribute name="sourceId" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
        <attribute name="validUntil" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
    </entity>
    <entity name="PremiumStatus" representedClassName="PremiumStatus" syncable="YES">
        <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
        <attribute name="isFamilyShared" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
        <attribute name="isPremium" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
        <attribute name="lastVerificationDate" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="originalPurchaseDate" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="productIdentifier" optional="YES" attributeType="String"/>
        <attribute name="purchaseDate" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="transactionId" optional="YES" attributeType="String"/>
    </entity>
    <entity name="Snapshot" representedClassName="Snapshot" syncable="YES">
        <attribute name="contribution" optional="YES" attributeType="Decimal"/>
        <attribute name="createdAt" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
        <attribute name="notes" optional="YES" attributeType="String"/>
        <attribute name="value" optional="YES" attributeType="Decimal"/>
        <relationship name="source" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="InvestmentSource" inverseName="snapshots" inverseEntity="InvestmentSource"/>
    </entity>
    <entity name="JournalEntry" representedClassName="JournalEntry" syncable="YES">
        <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
        <attribute name="monthKey" optional="YES" attributeType="String"/>
        <attribute name="note" optional="YES" attributeType="String"/>
        <attribute name="moodRaw" optional="YES" attributeType="String"/>
        <attribute name="rating" optional="YES" attributeType="Integer 16" usesScalarValueType="YES"/>
        <attribute name="completionTime" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="createdAt" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
    </entity>
</model>
