# Generated by Django 2.0.5 on 2018-12-25 13:28

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='BranchClient',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('client_id', models.CharField(default='', max_length=50, unique=True, verbose_name='客户代码')),
                ('name', models.CharField(default='', max_length=100, verbose_name='客户名')),
                ('company_name', models.CharField(default='', max_length=100, verbose_name='客户公司名')),
                ('address', models.CharField(default='', max_length=100, verbose_name='客户地址')),
                ('tax_number', models.CharField(default='', max_length=50, verbose_name='税号')),
                ('credit', models.CharField(choices=[('1', '1'), ('2', '2'), ('3', '3'), ('4', '4'), ('5', '5')], default='5', max_length=10, verbose_name='客户信用')),
                ('level', models.CharField(choices=[('1', '1'), ('2', '2'), ('3', '3'), ('4', '4'), ('5', '5')], default='1', max_length=10, verbose_name='客户级别')),
                ('info', models.CharField(default='', max_length=100, verbose_name='客户信息')),
                ('recent_date', models.DateField(verbose_name='最近通讯时间')),
                ('salesman', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL, verbose_name='所属业务员')),
            ],
        ),
        migrations.CreateModel(
            name='ClientContact',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('email', models.CharField(default='', max_length=50, unique=True, verbose_name='邮箱')),
                ('branch_client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='branch_client.BranchClient', verbose_name='客户')),
            ],
        ),
    ]
