# Generated by Django 2.2.1 on 2019-08-02 15:18

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


class Migration(migrations.Migration):

    dependencies = [
        ('stock', '0006_auto_20190730_1224'),
    ]

    operations = [
        migrations.CreateModel(
            name='Owner',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=100)),
                ('last_name', models.CharField(max_length=100)),
                ('date_of_birth', models.DateField(blank=True, null=True)),
                ('date_of_death', models.DateField(blank=True, null=True, verbose_name='died')),
            ],
            options={
                'ordering': ['last_name', 'first_name'],
            },
        ),
        migrations.CreateModel(
            name='Sector',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
        ),
        migrations.AlterModelOptions(
            name='kospiinstance',
            options={'ordering': ['due_back'], 'permissions': (('can_mark_returned', 'Set kospi as returned'),)},
        ),
        migrations.AddField(
            model_name='kospi',
            name='feature',
            field=models.TextField(null=True),
        ),
        migrations.RemoveField(
            model_name='kosdak',
            name='sector',
        ),
        migrations.AlterField(
            model_name='kosdakinstance',
            name='status',
            field=models.CharField(blank=True, choices=[('d', 'Maintenance'), ('h', 'Having'), ('a', 'Available'), ('r', 'Reserved')], default='d', help_text='Kosdak owner', max_length=1),
        ),
        migrations.AddField(
            model_name='kosdak',
            name='owner',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='stock.Owner'),
        ),
        migrations.AddField(
            model_name='kospi',
            name='owner',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='stock.Owner'),
        ),
        migrations.AddField(
            model_name='kospi',
            name='sector',
            field=models.ManyToManyField(null=True, to='stock.Sector'),
        ),
        migrations.AddField(
            model_name='kosdak',
            name='sector',
            field=models.ManyToManyField(null=True, to='stock.Sector'),
        ),
    ]
