# -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-05-07 13:40
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('trans', '0131_auto_20180416_1610'),
        ('lang', '0011_auto_20180215_1158'),
        ('weblate_auth', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=150, unique=True, verbose_name='Name')),
                ('project_selection', models.IntegerField(choices=[(0, 'As defined'), (1, 'All projects'), (2, 'From component list')], default=0, verbose_name='Project selection')),
                ('language_selection', models.IntegerField(choices=[(0, 'As defined'), (1, 'All languages')], default=0, verbose_name='Language selection')),
                ('internal', models.BooleanField(default=False, verbose_name='Weblate internal group')),
                ('componentlist', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='trans.ComponentList', verbose_name='Component list')),
                ('languages', models.ManyToManyField(blank=True, to='lang.Language', verbose_name='Languages')),
                ('projects', models.ManyToManyField(blank=True, to='trans.Project', verbose_name='Projects')),
            ],
        ),
        migrations.CreateModel(
            name='Permission',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('codename', models.CharField(max_length=100, unique=True)),
                ('name', models.CharField(max_length=200)),
            ],
            options={
                'ordering': ['codename'],
                'verbose_name': 'Permission',
                'verbose_name_plural': 'Permissions',
            },
        ),
        migrations.CreateModel(
            name='Role',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, verbose_name='Name')),
                ('permissions', models.ManyToManyField(blank=True, help_text='Choose permissions granted to this role.', to='weblate_auth.Permission', verbose_name='Permissions')),
            ],
        ),
        migrations.AddField(
            model_name='group',
            name='roles',
            field=models.ManyToManyField(blank=True, help_text='Choose roles granted to this group.', to='weblate_auth.Role', verbose_name='Roles'),
        ),
        migrations.AddField(
            model_name='user',
            name='groups',
            field=models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', to='weblate_auth.Group', verbose_name='Groups'),
        ),
    ]
