# Generated by Django 3.0 on 2019-12-12 09:39

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


class Migration(migrations.Migration):

    dependencies = [
        ('rbac', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Permission',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=32, verbose_name='权限名')),
                ('url', models.CharField(blank=True, help_text='是否给菜单设置一个url地址', max_length=300, null=True, verbose_name='权限url地址')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('menu', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='rbac.Menu', verbose_name='对应菜单')),
                ('parent', models.ForeignKey(blank=True, help_text='如果添加的是子权限，请选择父权限', null=True, on_delete=django.db.models.deletion.CASCADE, to='rbac.Permission', verbose_name='父级权限')),
            ],
            options={
                'verbose_name': '权限表',
                'verbose_name_plural': '权限表',
                'ordering': ['id'],
            },
        ),
    ]
