# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-17 01:32
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),
        ('dream', '0003_auto_20170217_0132'),
    ]

    operations = [
        migrations.CreateModel(
            name='Coupon',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=64)),
                ('percent_discount', models.FloatField()),
                ('fixed_discount', models.FloatField()),
                ('all_products_available', models.BooleanField(default=False)),
                ('expiration_date', models.DateTimeField()),
                ('is_available', models.BooleanField()),
                ('categories', models.ManyToManyField(blank=True, to='dream.Group')),
                ('dreams', models.ManyToManyField(blank=True, to='dream.Dream')),
                ('packs', models.ManyToManyField(blank=True, to='dream.Pack')),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('price', models.FloatField()),
                ('discount', models.FloatField()),
                ('dream', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='dream.Dream')),
            ],
        ),
        migrations.CreateModel(
            name='PaymentMethod',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=64)),
                ('api_key', models.CharField(max_length=128)),
                ('user_auth', models.CharField(max_length=32)),
                ('password_auth', models.CharField(max_length=64)),
                ('is_available', models.BooleanField()),
            ],
        ),
        migrations.CreateModel(
            name='Plan',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('duration', models.IntegerField()),
                ('description', models.CharField(max_length=256)),
                ('price', models.FloatField()),
                ('is_available', models.BooleanField()),
            ],
        ),
        migrations.CreateModel(
            name='Price',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('added_on', models.DateTimeField(auto_now_add=True)),
                ('value', models.FloatField()),
            ],
        ),
        migrations.CreateModel(
            name='UsedCoupon',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('coupon', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shoppingcar.Coupon')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='order',
            name='payment_method',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='shoppingcar.PaymentMethod'),
        ),
        migrations.AddField(
            model_name='order',
            name='plan',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='shoppingcar.Plan'),
        ),
        migrations.AddField(
            model_name='order',
            name='user',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]

# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-17 01:32
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),
        ('dream', '0003_auto_20170217_0132'),
    ]

    operations = [
        migrations.CreateModel(
            name='Coupon',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=64)),
                ('percent_discount', models.FloatField()),
                ('fixed_discount', models.FloatField()),
                ('all_products_available', models.BooleanField(default=False)),
                ('expiration_date', models.DateTimeField()),
                ('is_available', models.BooleanField()),
                ('categories', models.ManyToManyField(blank=True, to='dream.Group')),
                ('dreams', models.ManyToManyField(blank=True, to='dream.Dream')),
                ('packs', models.ManyToManyField(blank=True, to='dream.Pack')),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('price', models.FloatField()),
                ('discount', models.FloatField()),
                ('dream', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='dream.Dream')),
            ],
        ),
        migrations.CreateModel(
            name='PaymentMethod',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=64)),
                ('api_key', models.CharField(max_length=128)),
                ('user_auth', models.CharField(max_length=32)),
                ('password_auth', models.CharField(max_length=64)),
                ('is_available', models.BooleanField()),
            ],
        ),
        migrations.CreateModel(
            name='Plan',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('duration', models.IntegerField()),
                ('description', models.CharField(max_length=256)),
                ('price', models.FloatField()),
                ('is_available', models.BooleanField()),
            ],
        ),
        migrations.CreateModel(
            name='Price',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('added_on', models.DateTimeField(auto_now_add=True)),
                ('value', models.FloatField()),
            ],
        ),
        migrations.CreateModel(
            name='UsedCoupon',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('coupon', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shoppingcar.Coupon')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='order',
            name='payment_method',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='shoppingcar.PaymentMethod'),
        ),
        migrations.AddField(
            model_name='order',
            name='plan',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='shoppingcar.Plan'),
        ),
        migrations.AddField(
            model_name='order',
            name='user',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]

# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-17 01:32