# Generated by Django 2.2.6 on 2020-03-28 13:59

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='UserProfileInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('role', models.CharField(max_length=25)),
                ('profile_pic', models.ImageField(blank=True, upload_to='profile_pics')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Painting',
            fields=[
                ('painting_id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100)),
                ('date_added', models.DateTimeField(auto_now=True)),
                ('description', models.CharField(max_length=250)),
                ('image', models.ImageField(blank=True, upload_to='paintings')),
                ('price', models.DecimalField(decimal_places=2, max_digits=9999)),
                ('available', models.BooleanField(default=True)),
                ('rented_from', models.DateField(null=True)),
                ('rented_till', models.DateField(null=True)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='author_painting', to=settings.AUTH_USER_MODEL)),
                ('rented_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='renter_painting', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
