# Generated by Django 4.1.5 on 2023-03-03 18:38

import django.db.models.deletion
import django.utils.timezone
from django.conf import settings
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):
    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("paperless_mail", "0017_mailaccount_owner_mailrule_owner"),
    ]

    operations = [
        migrations.CreateModel(
            name="ProcessedMail",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "folder",
                    models.CharField(
                        editable=False,
                        max_length=256,
                        verbose_name="folder",
                    ),
                ),
                (
                    "uid",
                    models.CharField(
                        editable=False,
                        max_length=256,
                        verbose_name="uid",
                    ),
                ),
                (
                    "subject",
                    models.CharField(
                        editable=False,
                        max_length=256,
                        verbose_name="subject",
                    ),
                ),
                (
                    "received",
                    models.DateTimeField(editable=False, verbose_name="received"),
                ),
                (
                    "processed",
                    models.DateTimeField(
                        default=django.utils.timezone.now,
                        editable=False,
                        verbose_name="processed",
                    ),
                ),
                (
                    "status",
                    models.CharField(
                        editable=False,
                        max_length=256,
                        verbose_name="status",
                    ),
                ),
                (
                    "error",
                    models.TextField(
                        blank=True,
                        editable=False,
                        null=True,
                        verbose_name="error",
                    ),
                ),
                (
                    "owner",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to=settings.AUTH_USER_MODEL,
                        verbose_name="owner",
                    ),
                ),
                (
                    "rule",
                    models.ForeignKey(
                        editable=False,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="paperless_mail.mailrule",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
    ]
