# Generated by Django 3.2.5 on 2021-07-14 14:11

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Chat',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='Chat_name')),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Chat was created at')),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(max_length=50, verbose_name='Username')),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now, verbose_name='User was created at')),
            ],
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField(verbose_name='Message text')),
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='Message was created at')),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.user', verbose_name='User Id')),
                ('chat', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.chat', verbose_name='Chat Id')),
            ],
        ),
        migrations.CreateModel(
            name='Contact',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('chat', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.chat', verbose_name='Chat Id')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.user', verbose_name='User Id')),
            ],
        ),
    ]
