# Generated by Django 4.2.11 on 2025-01-24 04:26

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


class Migration(migrations.Migration):

    dependencies = [
        ('skyonnadmin', '0065_internalteam_fullname'),
        ('user', '0031_message_attachment'),
    ]

    operations = [
        migrations.AddField(
            model_name='message',
            name='is_trashed',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='message',
            name='reply_to',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='replies', to='user.message', to_field='message_id'),
        ),
        migrations.AddField(
            model_name='message',
            name='seen_time',
            field=models.DateTimeField(blank=True, null=True),
        ),
        migrations.AlterField(
            model_name='message',
            name='attachment',
            field=models.FileField(blank=True, null=True, upload_to='attachment/'),
        ),
        migrations.RemoveField(
            model_name='message',
            name='recipient',
        ),
        migrations.CreateModel(
            name='FileDownload',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_downloaded', models.DateTimeField(auto_now_add=True)),
                ('last_downloaded', models.DateTimeField(auto_now=True)),
                ('message', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='downloads', to='user.message', to_field='message_id')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='skyonnadmin.internalteam', to_field='Email1')),
            ],
        ),
        migrations.AddField(
            model_name='message',
            name='recipient',
            field=models.ManyToManyField(related_name='received_messages', to='skyonnadmin.internalteam'),
        ),
    ]
