# Generated by Django 3.0.7 on 2020-10-13 11:49

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


class Migration(migrations.Migration):

    dependencies = [
        ('app', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Auction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, verbose_name='Название аукциона')),
                ('description', models.CharField(max_length=500, verbose_name='Описание аукциона')),
                ('date_start', models.DateTimeField(blank=True, verbose_name='Дата начала аукциона')),
                ('date_end', models.DateTimeField(blank=True, verbose_name='Дата завершения аукциона')),
                ('rate_start', models.IntegerField(default=0, verbose_name='Начальная ставка')),
                ('is_active', models.BooleanField(default=True, verbose_name='Активный аукцион')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Создан')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Обновлен')),
                ('deleted_at', models.DateTimeField(blank=True, default=None, null=True, verbose_name='Удален')),
            ],
            options={
                'verbose_name': 'Аукцион',
                'verbose_name_plural': 'Аукционы',
                'default_permissions': [],
            },
        ),
        migrations.AddField(
            model_name='userprofile',
            name='name',
            field=models.CharField(default='', max_length=155),
        ),
        migrations.CreateModel(
            name='RateMember',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rate', models.IntegerField(default=0, verbose_name='Cтавка участника')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Создан')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Обновлен')),
                ('deleted_at', models.DateTimeField(blank=True, default=None, null=True, verbose_name='Удален')),
                ('auction', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='rate_member', related_query_name='rate_member', to='app.Auction')),
                ('member', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.UserProfile')),
            ],
            options={
                'verbose_name': 'Ставка',
                'verbose_name_plural': 'Ставки',
                'default_permissions': [],
            },
        ),
        migrations.AddField(
            model_name='auction',
            name='avtor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.UserProfile'),
        ),
    ]
