# Generated by Django 4.2.11 on 2025-01-08 06:29

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


class Migration(migrations.Migration):

    dependencies = [
        ('skyonnadmin', '0064_alter_internalteam_email1'),
        ('user', '0027_jobposting_maxamount_jobposting_minamount_and_more'),
    ]

    operations = [
        migrations.AlterField(
            model_name='jobposting',
            name='timePeriod',
            field=models.CharField(blank=True, max_length=20, null=True),
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('message_id', models.CharField(max_length=255, null=True, unique=True)),
                ('subject', models.CharField(max_length=255)),
                ('body', models.TextField()),
                ('is_read', models.BooleanField(default=False)),
                ('sent_at', models.DateTimeField(auto_now_add=True)),
                ('sender_fullname', models.CharField(max_length=255, null=True)),
                ('recipient_fullname', models.CharField(max_length=255, null=True)),
                ('recipient', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='received_messages', to='skyonnadmin.internalteam', to_field='Email1')),
                ('sender', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sent_messages', to='skyonnadmin.internalteam', to_field='Email1')),
            ],
            options={
                'ordering': ['-sent_at'],
            },
        ),
    ]
