# -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-04-29 14:01
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='Address',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('line1', models.CharField(max_length=150)),
                ('line2', models.CharField(max_length=150)),
                ('postalcode', models.CharField(max_length=10)),
                ('city', models.CharField(max_length=150)),
                ('country', models.CharField(max_length=150)),
            ],
        ),
        migrations.CreateModel(
            name='Call',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('call_date', models.DateTimeField(blank=True, null=True)),
                ('call_tries', models.IntegerField(max_length=3)),
                ('call_rightcontact', models.NullBooleanField()),
                ('call_comments', models.TextField()),
                ('call_fupdate', models.DateTimeField(blank=True, null=True)),
                ('call_islead', models.NullBooleanField()),
                ('call_leadcode', models.CharField(max_length=10)),
                ('call_visitdate', models.DateTimeField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Company',
            fields=[
                ('company_name', models.CharField(max_length=100)),
                ('company_code', models.CharField(max_length=10, primary_key=True, serialize=False)),
                ('company_industry', models.CharField(max_length=50)),
                ('company_channel', models.CharField(max_length=50)),
                ('company_salesRep', models.CharField(max_length=50)),
                ('company_revenue', models.FloatField()),
                ('company_amountEmp', models.IntegerField()),
                ('company_createdDate', models.DateTimeField(blank=True, null=True)),
                ('company_address', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='crm.Address')),
            ],
        ),
        migrations.CreateModel(
            name='Contact',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('contact_name', models.CharField(max_length=50)),
                ('contact_role', models.CharField(max_length=50)),
                ('contact_phone1', models.CharField(max_length=50)),
                ('contact_phone2', models.CharField(max_length=50)),
                ('contact_email', models.EmailField(max_length=254)),
                ('contact_called', models.NullBooleanField()),
                ('contact_createdDate', models.DateTimeField(blank=True, null=True)),
                ('contact_company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='crm.Company')),
            ],
        ),
        migrations.AddField(
            model_name='call',
            name='call_company',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='crm.Company'),
        ),
        migrations.AddField(
            model_name='call',
            name='call_contact',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='crm.Contact'),
        ),
    ]
