# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-10 07:12
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='Client',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=30)),
                ('last_name', models.CharField(max_length=30)),
                ('phone', models.CharField(blank=True, default='', max_length=14)),
                ('mobile', models.CharField(blank=True, default='', max_length=14, unique=True)),
                ('email', models.EmailField(max_length=254, null=True, unique=True)),
                ('comment', models.TextField(blank=True, default='', max_length=300)),
            ],
        ),
        migrations.CreateModel(
            name='Device',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('model', models.CharField(max_length=50)),
                ('serial_number', models.CharField(max_length=20, null=True, unique=True)),
                ('description', models.CharField(max_length=20, null=True)),
                ('comment', models.TextField(max_length=200, null=True)),
                ('client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='devices', to='client.Client')),
            ],
        ),
        migrations.CreateModel(
            name='DeviceType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(max_length=20, unique=True)),
            ],
        ),
        migrations.AddField(
            model_name='device',
            name='type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='devices', to='client.DeviceType'),
        ),
    ]
