# Generated by Django 3.2.4 on 2021-06-27 02:51

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Rental',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('product', models.CharField(max_length=20)),
                ('price', models.IntegerField()),
                ('location_city', models.CharField(max_length=10)),
                ('location_detail', models.CharField(max_length=10)),
                ('rentterm', models.IntegerField()),
                ('information', models.CharField(max_length=300)),
                ('images', models.ImageField(blank=True, null=True, upload_to='images/')),
                ('writer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='rentals', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Like',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rental', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='like', to='rental.rental')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='like', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
