# Generated by Django 4.0 on 2021-12-25 09:57

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
        ('user', '0002_renteeimages'),
    ]

    operations = [
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('quantity', models.PositiveIntegerField()),
                ('price', models.PositiveIntegerField()),
                ('image', models.ImageField(upload_to='')),
            ],
        ),
        migrations.CreateModel(
            name='Rent',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('total_cost', models.PositiveIntegerField()),
                ('paid', models.PositiveIntegerField()),
                ('rented_date', models.DateTimeField(auto_now_add=True)),
                ('closed_date', models.DateField()),
                ('entered_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='auth.user')),
                ('rentee', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='user.rentee')),
                ('renter', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='renter', to='auth.user')),
            ],
        ),
        migrations.CreateModel(
            name='Type',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('icon', models.ImageField(upload_to='')),
                ('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rent.item')),
            ],
        ),
        migrations.CreateModel(
            name='RentedItem',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.PositiveIntegerField()),
                ('item', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='rent.item')),
                ('record', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='rent.rent')),
            ],
        ),
    ]
