# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-10-13 08:43
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('item_name', models.CharField(db_index=True, max_length=16, verbose_name='商品名')),
                ('item_unit', models.CharField(default='', max_length=8, verbose_name='商品单位')),
                ('created_at', models.DateField(auto_now=True, verbose_name='创建日期')),
            ],
        ),
        migrations.CreateModel(
            name='ItemType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type_name', models.CharField(max_length=16)),
            ],
        ),
        migrations.CreateModel(
            name='Record',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('item_name', models.CharField(default='', max_length=16, verbose_name='物品名')),
                ('unit', models.CharField(default='', max_length=8, verbose_name='单位')),
                ('lowest_price', models.IntegerField(verbose_name='最低价格')),
                ('avg_price', models.IntegerField(verbose_name='平均价格')),
                ('highest_price', models.IntegerField(verbose_name='最高价格')),
                ('created_at', models.DateField(auto_now=True, verbose_name='日期')),
                ('item', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='search.Item', verbose_name='所属物品')),
            ],
        ),
        migrations.AddField(
            model_name='item',
            name='item_type',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='search.ItemType', verbose_name='所属类型'),
        ),
    ]
