# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2017-01-12 13:21
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0010_auto_20170112_1209'),
    ]

    operations = [
        migrations.CreateModel(
            name='CompanyShare',
            fields=[
                ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('shares', models.IntegerField(default=1)),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Company')),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='core.Company')),
            ],
        ),
        migrations.AddField(
            model_name='company',
            name='company_owners',
            field=models.ManyToManyField(related_name='shares', through='core.CompanyShare', to='core.Company'),
        ),
        migrations.AlterUniqueTogether(
            name='companyshare',
            unique_together=set([('owner', 'company')]),
        ),
    ]
