# Generated by Django 5.1.13 on 2025-12-15 22:27

import django.db.models.deletion
import uuid
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0011_alter_messagetemplate_type'),
    ]

    operations = [
        migrations.AddField(
            model_name='maildomain',
            name='custom_settings',
            field=models.JSONField(blank=True, default=dict, help_text='Custom settings for the mail domain.', verbose_name='Custom settings'),
        ),
        migrations.AlterField(
            model_name='user',
            name='language',
            field=models.CharField(choices=[('en-us', 'English'), ('fr-fr', 'French'), ('nl-nl', 'Dutch')], default='en-us', help_text='The language in which the user wants to see the interface.', max_length=10, verbose_name='language'),
        ),
        migrations.CreateModel(
            name='InboundMessage',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, help_text='primary key for the record as UUID', primary_key=True, serialize=False, verbose_name='id')),
                ('created_at', models.DateTimeField(auto_now_add=True, help_text='date and time at which a record was created', verbose_name='created on')),
                ('updated_at', models.DateTimeField(auto_now=True, help_text='date and time at which a record was last updated', verbose_name='updated on')),
                ('raw_data', models.BinaryField(help_text='Raw email message bytes', verbose_name='raw data')),
                ('error_message', models.TextField(blank=True, help_text='Error message if processing failed', verbose_name='error message')),
                ('channel', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='inbound_messages', to='core.channel')),
                ('mailbox', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='inbound_messages', to='core.mailbox')),
            ],
            options={
                'verbose_name': 'inbound message',
                'verbose_name_plural': 'inbound messages',
                'db_table': 'messages_inboundmessage',
                'ordering': ['-created_at'],
                'indexes': [models.Index(fields=['created_at'], name='messages_in_created_566a1f_idx')],
            },
        ),
    ]
