# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-10-11 22:45
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='ObjectPermission',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('can_view', models.BooleanField(verbose_name='can view')),
                ('can_edit', models.BooleanField(verbose_name='can edit')),
                ('can_delete', models.BooleanField(verbose_name='can delete')),
                ('object_id', models.CharField(max_length=36)),
                ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='access_control_objectpermission_content_type', to='contenttypes.ContentType', verbose_name='type')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='access_control_objectpermission_user', to=settings.AUTH_USER_MODEL, verbose_name='user')),
            ],
            options={
                'ordering': ['user'],
                'verbose_name': 'object permission',
                'verbose_name_plural': 'object permissions',
            },
        ),
        migrations.AlterUniqueTogether(
            name='objectpermission',
            unique_together=set([('user', 'content_type', 'object_id')]),
        ),
    ]
