# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-06-16 12:27
from __future__ import unicode_literals

import datetime
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='Auction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('image', models.ImageField(upload_to='auction_img/%Y/%m/%d/')),
                ('description', models.CharField(max_length=5000)),
                ('pub_date', models.DateTimeField(auto_now_add=True)),
                ('expire_date', models.DateTimeField(default=datetime.datetime.now)),
                ('min_price', models.DecimalField(decimal_places=2, default=0, max_digits=10)),
                ('min_bid', models.DecimalField(decimal_places=2, default=0.5, max_digits=10)),
                ('bid_count', models.IntegerField(default=0)),
                ('current_price', models.DecimalField(decimal_places=2, default=0, max_digits=10)),
                ('active', models.BooleanField(default=True)),
                ('category', models.CharField(choices=[('MS', 'Music'), ('BK', 'Book'), ('CL', 'Clothes'), ('TL', 'Tools'), ('EL', 'Electronics'), ('GM', 'Games'), ('HS', 'House'), ('OT', 'Other')], default=('OT', 'Other'), max_length=50)),
                ('last_bid_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='last_bid_user', to=settings.AUTH_USER_MODEL)),
                ('seller', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='seller', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('feedback', models.FloatField(default=0)),
                ('auction_count', models.SmallIntegerField(default=3)),
                ('premium', models.BooleanField(default=False)),
                ('description', models.CharField(default='', max_length=1000)),
                ('profile_pic', models.ImageField(default='profile_img/defaultprofileimage.png', upload_to='profile_img/')),
                ('sold_auction', models.IntegerField(default=0)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
