# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-03-19 10:37
from __future__ import unicode_literals

import django.contrib.postgres.fields
from django.db import migrations, models
import django.db.models.deletion
import tinymce.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Author',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('description', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Genre', models.IntegerField(choices=[(1, 'Science fiction'), (2, 'Drama'), (3, 'Thriller'), (4, 'Horror'), (5, 'Action and Adventure'), (6, 'Mystery'), (7, 'Romance'), (8, 'Travel'), (9, 'Fantasy'), (10, 'Satire'), (11, 'Religion & Spiritualty')], verbose_name='Genre')),
                ('Educational', models.IntegerField(choices=[(1, 'Law'), (2, 'Science'), (3, 'Architecture'), (4, 'History'), (5, 'Maths'), (6, 'Encyclopedias'), (7, 'Poetry'), (8, 'Dictionaries'), (9, 'Diaries'), (10, 'journals')], verbose_name='Educational')),
                ('Extra', models.IntegerField(choices=[(1, 'New Arrivals'), (2, 'Bestsellers'), (3, 'TextBooks'), (4, 'Award Winners'), (5, 'Features Winners')], verbose_name='Extra Fields')),
            ],
        ),
        migrations.CreateModel(
            name='EmailMessage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('from_email', models.CharField(default='nsitester1@gmail.com', max_length=255)),
                ('to_email', models.EmailField(max_length=255)),
                ('cc', django.contrib.postgres.fields.ArrayField(base_field=models.EmailField(max_length=255), blank=True, null=True, size=None)),
                ('subject', models.CharField(blank=True, max_length=200, null=True)),
                ('html_message', tinymce.models.HTMLField()),
                ('tries', models.PositiveSmallIntegerField(default=0)),
                ('error_detail', models.CharField(blank=True, max_length=255, null=True)),
                ('sent_status', models.SmallIntegerField(choices=[(1, 'Pending'), (2, 'In-Progress'), (3, 'Sent'), (4, 'Error')], default=1)),
                ('sent_date', models.DateTimeField(blank=True, null=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('modify_date', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('isbn', models.CharField(max_length=16)),
                ('title', models.CharField(max_length=100)),
                ('description', models.TextField()),
                ('pages', models.IntegerField()),
                ('price', models.DecimalField(decimal_places=2, max_digits=10)),
                ('genre_type', models.CharField(max_length=30)),
                ('slug', models.CharField(max_length=100)),
                ('is_active', models.BooleanField(default=False)),
                ('is_delete', models.BooleanField(default=False)),
                ('added_on', models.DateTimeField(auto_now_add=True)),
                ('last_modified', models.DateTimeField(auto_now=True)),
                ('author', models.ManyToManyField(to='app.Author')),
            ],
        ),
        migrations.CreateModel(
            name='Publisher',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=10, verbose_name='Name')),
            ],
        ),
        migrations.AddField(
            model_name='product',
            name='publisher',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Publisher'),
        ),
        migrations.AddField(
            model_name='category',
            name='Books',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Product'),
        ),
    ]
