# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-11-18 16:44
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='Log',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(auto_now=True)),
                ('action', models.CharField(blank=True, max_length=100)),
                ('qty', models.IntegerField(blank=True, null=True)),
                ('note', models.CharField(blank=True, max_length=100)),
                ('vendor', models.CharField(blank=True, max_length=100)),
                ('invoice', models.CharField(blank=True, max_length=100)),
                ('price', models.FloatField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Manufacture',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('website', models.CharField(blank=True, max_length=100)),
                ('contact', models.CharField(blank=True, max_length=100)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Package',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('library', models.CharField(blank=True, max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Part',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('part_number', models.CharField(blank=True, max_length=100)),
                ('description', models.CharField(blank=True, max_length=100)),
                ('value', models.CharField(blank=True, max_length=100)),
                ('location', models.CharField(blank=True, max_length=100)),
                ('vendor_sku', models.CharField(blank=True, max_length=100)),
                ('qty', models.IntegerField(default=0)),
                ('price', models.FloatField(default=0)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('lastupdate', models.DateTimeField(auto_now=True)),
                ('manufacture', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='electroInv.Manufacture')),
                ('package', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='electroInv.Package')),
            ],
        ),
        migrations.CreateModel(
            name='Type',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('reference', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Vendor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('website', models.CharField(blank=True, max_length=100)),
                ('contact', models.CharField(blank=True, max_length=100)),
            ],
        ),
        migrations.AddField(
            model_name='part',
            name='part_type',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='electroInv.Type'),
        ),
        migrations.AddField(
            model_name='part',
            name='vendor',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='electroInv.Vendor'),
        ),
        migrations.AddField(
            model_name='log',
            name='part',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='electroInv.Part'),
        ),
    ]
