# Generated by Django 2.0 on 2020-06-16 06:52

import apps.reader.models
import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('rss_feeds', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Feature',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.TextField(default='')),
                ('date', models.DateTimeField(default=datetime.datetime.now)),
            ],
            options={
                'ordering': ['-date'],
            },
        ),
        migrations.CreateModel(
            name='UserSubscription',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('user_title', models.CharField(blank=True, max_length=255, null=True)),
                ('active', models.BooleanField(default=False)),
                ('last_read_date', models.DateTimeField(default=apps.reader.models.unread_cutoff_default)),
                ('mark_read_date', models.DateTimeField(default=apps.reader.models.unread_cutoff_default)),
                ('unread_count_neutral', models.IntegerField(default=0)),
                ('unread_count_positive', models.IntegerField(default=0)),
                ('unread_count_negative', models.IntegerField(default=0)),
                ('unread_count_updated', models.DateTimeField(default=datetime.datetime.now)),
                ('oldest_unread_story_date', models.DateTimeField(default=datetime.datetime.now)),
                ('needs_unread_recalc', models.BooleanField(default=False)),
                ('feed_opens', models.IntegerField(default=0)),
                ('is_trained', models.BooleanField(default=False)),
                ('feed', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='subscribers', to='rss_feeds.Feed')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='subscriptions', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UserSubscriptionFolders',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('folders', models.TextField(default='[]')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'folder',
                'verbose_name_plural': 'folders',
            },
        ),
        migrations.AlterUniqueTogether(
            name='usersubscription',
            unique_together={('user', 'feed')},
        ),
    ]
