# -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-03-23 20:19
from __future__ import unicode_literals

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='Cart',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_time', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Coupon',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(blank=True, default=b'', max_length=64)),
                ('description', models.TextField()),
                ('coupon_type', models.CharField(default=b'numerical', max_length=64)),
                ('discount', models.DecimalField(decimal_places=2, default=0, max_digits=5)),
            ],
        ),
        migrations.CreateModel(
            name='HistoryEntry',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_time', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('price', models.DecimalField(decimal_places=2, default=0, max_digits=5)),
                ('product_type', models.CharField(default=b'Pants', max_length=64)),
                ('description', models.TextField(default=b'No description')),
                ('source', models.URLField(default=b'http://google.com/')),
                ('name', models.TextField(default=b'Unnamed Product')),
                ('views', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Store',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('store_url', models.URLField(default=b'http://google.com/')),
                ('title', models.TextField(default=b'No title')),
                ('description', models.TextField(default=b'No description')),
                ('coupons', models.ManyToManyField(blank=True, related_name='site_store_coupons', to='Site.Coupon')),
                ('products', models.ManyToManyField(blank=True, related_name='site_store_products', to='Site.Product')),
            ],
        ),
        migrations.CreateModel(
            name='UserInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cart', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='Site.Cart')),
                ('history', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='site_userinfo_history', to='Site.HistoryEntry')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='historyentry',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Site.Product'),
        ),
        migrations.AddField(
            model_name='cart',
            name='products',
            field=models.ManyToManyField(blank=True, related_name='site_cart_products', to='Site.Product'),
        ),
    ]
