# Generated by Django 2.0.3 on 2018-03-30 04:46

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, unique=True)),
                ('slug', models.SlugField(unique=True)),
                ('color', models.CharField(choices=[('aa1409', 'Dark red'), ('f44336', 'Red'), ('e91e63', 'Pink'), ('ff66ff', 'Fuschia'), ('9c27b0', 'Purple'), ('673ab7', 'Dark purple'), ('3f51b5', 'Indigo'), ('2196f3', 'Blue'), ('03a9f4', 'Light blue'), ('00bcd4', 'Cyan'), ('009688', 'Teal'), ('2f6a31', 'Dark green'), ('4caf50', 'Green'), ('8bc34a', 'Light green'), ('cddc39', 'Lime'), ('ffeb3b', 'Yellow'), ('ffc107', 'Amber'), ('ff9800', 'Orange'), ('ff5722', 'Dark orange'), ('795548', 'Brown'), ('c0c0c0', 'Light grey'), ('9e9e9e', 'Grey'), ('607d8b', 'Dark grey'), ('111111', 'Black')], max_length=6)),
                ('lft', models.PositiveIntegerField(db_index=True, editable=False)),
                ('rght', models.PositiveIntegerField(db_index=True, editable=False)),
                ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
                ('level', models.PositiveIntegerField(db_index=True, editable=False)),
            ],
            options={
                'verbose_name_plural': 'categories',
            },
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('edited', models.DateTimeField(blank=True, editable=False, null=True)),
                ('body', models.TextField(max_length=4000)),
                ('body_rendered', models.TextField()),
                ('lft', models.PositiveIntegerField(db_index=True, editable=False)),
                ('rght', models.PositiveIntegerField(db_index=True, editable=False)),
                ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
                ('level', models.PositiveIntegerField(db_index=True, editable=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CommentVote',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('score', models.SmallIntegerField(choices=[(1, 'Up'), (-1, 'Down')])),
            ],
        ),
        migrations.CreateModel(
            name='Deal',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('edited', models.DateTimeField(blank=True, editable=False, null=True)),
                ('title', models.CharField(max_length=255)),
                ('url', models.URLField(max_length=255, verbose_name='URL')),
                ('score', models.SmallIntegerField(default=0, editable=False)),
                ('price', models.DecimalField(blank=True, decimal_places=2, help_text='Price in USD', max_digits=7, null=True)),
                ('qty', models.PositiveSmallIntegerField(blank=True, help_text='The number of items/rounds', null=True, verbose_name='Quantity')),
                ('discount', models.PositiveSmallIntegerField(blank=True, help_text='Fixed percentage discount', null=True, validators=[django.core.validators.MinValueValidator(1)])),
                ('expires', models.DateTimeField(blank=True, help_text='The date/time which this deal expires', null=True)),
                ('coupon_code', models.CharField(blank=True, help_text='Code required for discount', max_length=50)),
                ('locked', models.BooleanField(default=False, help_text='The submitter is not allowed to make changes')),
                ('out_of_stock', models.BooleanField(default=False, help_text='This product is no longer in stock')),
                ('description', models.TextField(blank=True, max_length=4000)),
                ('description_rendered', models.TextField(blank=True)),
            ],
            options={
                'ordering': ('-created',),
            },
        ),
        migrations.CreateModel(
            name='DealVote',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('score', models.SmallIntegerField(choices=[(1, 'Up'), (-1, 'Down')])),
                ('deal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='votes', to='deals.Deal')),
            ],
        ),
        migrations.CreateModel(
            name='Vendor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='Company name', max_length=100)),
                ('slug', models.SlugField(unique=True)),
                ('url', models.URLField(help_text='Public-facing website', verbose_name='URL')),
            ],
            options={
                'ordering': ('name',),
            },
        ),
        migrations.CreateModel(
            name='VendorDomain',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('domain', models.CharField(help_text='Vendor Domain', max_length=255, unique=True)),
                ('vendor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='deals.Vendor')),
            ],
        ),
    ]
