# Generated by Django 2.2.5 on 2019-10-01 14:45

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Img',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('img_url', models.ImageField(upload_to='img')),
                ('computerScore', models.IntegerField()),
                ('like', models.IntegerField()),
                ('create_time', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('account', models.CharField(max_length=50)),
                ('password', models.CharField(max_length=50)),
                ('like_img', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Img')),
            ],
        ),
        migrations.AddField(
            model_name='img',
            name='creator',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.User'),
        ),
        migrations.CreateModel(
            name='Commend',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('commend_id', models.CharField(max_length=50)),
                ('content', models.TextField()),
                ('create_time', models.DateTimeField(auto_now=True)),
                ('creator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.User')),
                ('img', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Img')),
            ],
        ),
    ]
