# Generated by Django 5.1.1 on 2024-10-10 18:21

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


class Migration(migrations.Migration):

    dependencies = [
        ('profiles', '0025_profile_passed_milestones'),
    ]

    operations = [
        migrations.CreateModel(
            name='Chat',
            fields=[
                ('id', models.SlugField(primary_key=True, serialize=False)),
                ('date_made', models.DateTimeField(default=django.utils.timezone.now)),
                ('members', models.ManyToManyField(related_name='members', to='profiles.profile')),
            ],
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('message', models.TextField()),
                ('id', models.SlugField(primary_key=True, serialize=False)),
                ('date_sent', models.DateTimeField(default=django.utils.timezone.now)),
                ('chat', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='profiles.chat')),
                ('sender', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sende', to='profiles.profile')),
            ],
        ),
        migrations.AddField(
            model_name='chat',
            name='messages',
            field=models.ManyToManyField(related_name='messages', to='profiles.message'),
        ),
    ]
