# Generated by Django 3.0.3 on 2020-02-22 09:59

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField(blank=True, default=None, max_length=100, verbose_name='текст коммента')),
                ('rating', models.DecimalField(decimal_places=1, default=None, max_digits=2)),
                ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comment_user', to='accounts.Account', verbose_name='комменты-пользователи')),
            ],
        ),
        migrations.CreateModel(
            name='Picture',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default=None, max_length=100, verbose_name='Заголовок')),
                ('average_rating', models.DecimalField(blank=True, decimal_places=1, default=None, max_digits=3, verbose_name='Средняя оценка')),
                ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='picture_account', to='accounts.Account')),
                ('comment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='picture_comment', to='pictures.Comment')),
            ],
        ),
        migrations.AddField(
            model_name='comment',
            name='picture',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='picture_user', to='pictures.Picture', verbose_name='комменты-картинки'),
        ),
    ]
