# Generated by Django 2.1.1 on 2018-09-27 20:53

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=300, verbose_name='Name')),
            ],
        ),
        migrations.CreateModel(
            name='Office',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('street', models.CharField(blank=True, max_length=256, verbose_name='Street')),
                ('postal_code', models.CharField(blank=True, max_length=32, verbose_name='Postal Code')),
                ('city', models.CharField(blank=True, max_length=128, null=True, verbose_name='City')),
                ('monthly_rent', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='offices', to='api.Company')),
            ],
        ),
        migrations.AddField(
            model_name='company',
            name='headquarter',
            field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='headquarter_of', to='api.Office'),
        ),
    ]
