# Generated by Django 2.2.27 on 2022-03-04 10:36

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


class Migration(migrations.Migration):

    dependencies = [
        ('authentic2', '0035_service_home_url'),
        ('custom_user', '0029_profile_profiletype'),
    ]

    operations = [
        migrations.CreateModel(
            name='ServiceProfileType',
            fields=[
                (
                    'id',
                    models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
                ),
                (
                    'profile_type',
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE, to='custom_user.ProfileType'
                    ),
                ),
                (
                    'service',
                    models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='authentic2.Service'),
                ),
            ],
            options={
                'unique_together': {('service', 'profile_type')},
            },
        ),
        migrations.AddField(
            model_name='profiletype',
            name='services',
            field=models.ManyToManyField(
                blank=True,
                related_name='_profiletype_services_+',
                through='custom_user.ServiceProfileType',
                to='authentic2.Service',
                verbose_name='allowed services for this profile type',
            ),
        ),
    ]
