# Generated by Django 4.0 on 2022-05-20 13:13

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


class Migration(migrations.Migration):

    dependencies = [
        ('organisation', '0002_branch_department_organisationsubscription'),
        ('user', '0002_generatetoken_apisettings_profile'),
        ('subscription', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='organisationsubscription',
            name='cycle',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='organisation_cycle', to='subscription.subscriptionprice'),
        ),
        migrations.AddField(
            model_name='organisationsubscription',
            name='organisation',
            field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='organisation.organisation'),
        ),
        migrations.AddField(
            model_name='organisationsubscription',
            name='subscription',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='organisation_subscription', to='subscription.subscription'),
        ),
        migrations.AddField(
            model_name='department',
            name='branch',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='departments', to='organisation.branch'),
        ),
        migrations.AddField(
            model_name='department',
            name='manager',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='department_manager', to='user.user'),
        ),
        migrations.AddField(
            model_name='department',
            name='organisation',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='branch_departments', to='organisation.organisation'),
        ),
        migrations.AddField(
            model_name='department',
            name='parent',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organisation.department'),
        ),
        migrations.AddField(
            model_name='branch',
            name='manager',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='branch_managers', to='user.user'),
        ),
        migrations.AddField(
            model_name='branch',
            name='organisation',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='org_branches', to='organisation.organisation'),
        ),
        migrations.AddField(
            model_name='branch',
            name='parent',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organisation.branch'),
        ),
    ]
