<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="21754" systemVersion="22G120" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
    <entity name="Callback" representedClassName="Callback" syncable="YES" codeGenerationType="class">
        <attribute name="createdAt" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="enabled" optional="YES" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES"/>
        <attribute name="headersJson" optional="YES" attributeType="String"/>
        <attribute name="id" optional="YES" attributeType="String"/>
        <attribute name="kind" optional="YES" attributeType="String"/>
        <attribute name="target" optional="YES" attributeType="String"/>
    </entity>
    <entity name="ContentCache" representedClassName="ContentCache" syncable="YES" codeGenerationType="class">
        <attribute name="fetchedAt" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="id" optional="YES" attributeType="String"/>
        <attribute name="meta" optional="YES" attributeType="String"/>
        <attribute name="payload" optional="YES" attributeType="Binary"/>
        <attribute name="ttlSeconds" optional="YES" attributeType="Integer 32" defaultValueString="3600" usesScalarValueType="YES"/>
    </entity>
    <entity name="History" representedClassName="History" syncable="YES" codeGenerationType="class">
        <attribute name="diagJson" optional="YES" attributeType="String"/>
        <attribute name="durationMs" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES"/>
        <attribute name="id" optional="YES" attributeType="String"/>
        <attribute name="kind" optional="YES" attributeType="String"/>
        <attribute name="occurredAt" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="outcome" optional="YES" attributeType="String"/>
        <attribute name="refId" optional="YES" attributeType="String"/>
    </entity>
    <entity name="Schedule" representedClassName="Schedule" syncable="YES" codeGenerationType="class">
        <attribute name="backoffPolicy" optional="YES" attributeType="String" defaultValueString="exp"/>
        <attribute name="clockTime" optional="YES" attributeType="String"/>
        <attribute name="cron" optional="YES" attributeType="String"/>
        <attribute name="enabled" optional="YES" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES"/>
        <attribute name="id" optional="YES" attributeType="String"/>
        <attribute name="jitterMs" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES"/>
        <attribute name="kind" optional="YES" attributeType="String"/>
        <attribute name="lastRunAt" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="nextRunAt" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="stateJson" optional="YES" attributeType="String"/>
    </entity>
    <entity name="NotificationContent" representedClassName="NotificationContentEntity" syncable="YES" codeGenerationType="class">
        <attribute name="id" optional="NO" attributeType="String"/>
        <attribute name="pluginVersion" optional="YES" attributeType="String"/>
        <attribute name="timesafariDid" optional="YES" attributeType="String"/>
        <attribute name="notificationType" optional="YES" attributeType="String"/>
        <attribute name="title" optional="YES" attributeType="String"/>
        <attribute name="body" optional="YES" attributeType="String"/>
        <attribute name="scheduledTime" optional="NO" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="timezone" optional="YES" attributeType="String"/>
        <attribute name="priority" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES"/>
        <attribute name="vibrationEnabled" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
        <attribute name="soundEnabled" optional="YES" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES"/>
        <attribute name="mediaUrl" optional="YES" attributeType="String"/>
        <attribute name="encryptedContent" optional="YES" attributeType="String"/>
        <attribute name="encryptionKeyId" optional="YES" attributeType="String"/>
        <attribute name="createdAt" optional="NO" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="updatedAt" optional="NO" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="ttlSeconds" optional="YES" attributeType="Integer 64" defaultValueString="604800" usesScalarValueType="YES"/>
        <attribute name="deliveryStatus" optional="YES" attributeType="String"/>
        <attribute name="deliveryAttempts" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES"/>
        <attribute name="lastDeliveryAttempt" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="userInteractionCount" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES"/>
        <attribute name="lastUserInteraction" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="metadata" optional="YES" attributeType="String"/>
        <relationship name="deliveries" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="NotificationDelivery" inverseName="notificationContent" inverseEntity="NotificationDelivery"/>
        <index name="index_notification_content_timesafari_did">
            <indexElement value="timesafariDid"/>
        </index>
        <index name="index_notification_content_notification_type">
            <indexElement value="notificationType"/>
        </index>
        <index name="index_notification_content_scheduled_time">
            <indexElement value="scheduledTime"/>
        </index>
    </entity>
    <entity name="NotificationDelivery" representedClassName="NotificationDelivery" syncable="YES" codeGenerationType="class">
        <attribute name="id" optional="NO" attributeType="String"/>
        <attribute name="notificationId" optional="YES" attributeType="String"/>
        <attribute name="timesafariDid" optional="YES" attributeType="String"/>
        <attribute name="deliveryTimestamp" optional="NO" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="deliveryStatus" optional="YES" attributeType="String"/>
        <attribute name="deliveryMethod" optional="YES" attributeType="String"/>
        <attribute name="deliveryAttemptNumber" optional="YES" attributeType="Integer 32" defaultValueString="1" usesScalarValueType="YES"/>
        <attribute name="deliveryDurationMs" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
        <attribute name="userInteractionType" optional="YES" attributeType="String"/>
        <attribute name="userInteractionTimestamp" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="userInteractionDurationMs" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
        <attribute name="errorCode" optional="YES" attributeType="String"/>
        <attribute name="errorMessage" optional="YES" attributeType="String"/>
        <attribute name="deviceInfo" optional="YES" attributeType="String"/>
        <attribute name="networkInfo" optional="YES" attributeType="String"/>
        <attribute name="batteryLevel" optional="YES" attributeType="Integer 32" defaultValueString="-1" usesScalarValueType="YES"/>
        <attribute name="dozeModeActive" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
        <attribute name="exactAlarmPermission" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
        <attribute name="notificationPermission" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
        <attribute name="metadata" optional="YES" attributeType="String"/>
        <relationship name="notificationContent" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="NotificationContent" inverseName="deliveries" inverseEntity="NotificationContent"/>
        <index name="index_notification_delivery_notification_id">
            <indexElement value="notificationId"/>
        </index>
        <index name="index_notification_delivery_delivery_timestamp">
            <indexElement value="deliveryTimestamp"/>
        </index>
    </entity>
    <entity name="NotificationConfig" representedClassName="NotificationConfig" syncable="YES" codeGenerationType="class">
        <attribute name="id" optional="NO" attributeType="String"/>
        <attribute name="timesafariDid" optional="YES" attributeType="String"/>
        <attribute name="configType" optional="YES" attributeType="String"/>
        <attribute name="configKey" optional="YES" attributeType="String"/>
        <attribute name="configValue" optional="YES" attributeType="String"/>
        <attribute name="configDataType" optional="YES" attributeType="String"/>
        <attribute name="isEncrypted" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
        <attribute name="encryptionKeyId" optional="YES" attributeType="String"/>
        <attribute name="createdAt" optional="NO" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="updatedAt" optional="NO" attributeType="Date" usesScalarValueType="NO"/>
        <attribute name="ttlSeconds" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
        <attribute name="isActive" optional="YES" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES"/>
        <attribute name="metadata" optional="YES" attributeType="String"/>
        <index name="index_notification_config_config_key">
            <indexElement value="configKey"/>
        </index>
        <index name="index_notification_config_config_type">
            <indexElement value="configType"/>
        </index>
        <index name="index_notification_config_timesafari_did">
            <indexElement value="timesafariDid"/>
        </index>
    </entity>
</model>
