# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-10-31 15:58
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('ebay_parse', '0004_setting_setting_comment'),
    ]

    operations = [
        migrations.CreateModel(
            name='Country',
            fields=[
                ('country_id', models.IntegerField(primary_key=True, serialize=False)),
                ('country_name', models.CharField(max_length=64)),
            ],
        ),
        migrations.CreateModel(
            name='eBayCategory',
            fields=[
                ('ebay_category_id', models.IntegerField(primary_key=True, serialize=False)),
                ('ebay_category_name', models.CharField(max_length=256)),
                ('ebay_category_parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='ebay_parse.eBayCategory')),
            ],
        ),
        migrations.CreateModel(
            name='eBayItem',
            fields=[
                ('ebay_item_id', models.BigIntegerField(primary_key=True, serialize=False)),
                ('ebay_item_title', models.CharField(max_length=256)),
                ('ebay_item_url', models.URLField()),
                ('ebay_item_postalcode', models.IntegerField()),
                ('ebay_item_location', models.CharField(max_length=256)),
                ('ebay_item_price', models.DecimalField(decimal_places=2, max_digits=5)),
                ('ebay_item_shipping_price', models.DecimalField(decimal_places=2, max_digits=10)),
                ('ebay_item_starttime', models.DateTimeField()),
                ('ebay_item_endtime', models.DateTimeField()),
                ('ebay_watch_count', models.IntegerField()),
                ('country', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='ebay_parse.Country')),
                ('ebay_category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ebay_parse.eBayCategory')),
            ],
        ),
        migrations.CreateModel(
            name='eBayPaymentMethod',
            fields=[
                ('payment_method_id', models.IntegerField(primary_key=True, serialize=False)),
                ('payment_method_name', models.CharField(max_length=64)),
            ],
        ),
        migrations.CreateModel(
            name='ListingType',
            fields=[
                ('listing_type_id', models.IntegerField(primary_key=True, serialize=False)),
                ('listing_type_name', models.CharField(max_length=64)),
            ],
        ),
        migrations.AddField(
            model_name='ebayitem',
            name='listing_type',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='ebay_parse.ListingType'),
        ),
        migrations.AddField(
            model_name='ebayitem',
            name='payment_method',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='ebay_parse.eBayPaymentMethod'),
        ),
    ]
