123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- # Generated by Django 3.0.8 on 2020-08-03 07:49
- from django.conf import settings
- from django.db import migrations, models
- import django.db.models.deletion
- class Migration(migrations.Migration):
- initial = True
- dependencies = [
- migrations.swappable_dependency(settings.AUTH_USER_MODEL),
- ]
- operations = [
- migrations.CreateModel(
- name='Route',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=80, verbose_name='name')),
- ('title', models.CharField(max_length=80, verbose_name='title')),
- ('url', models.CharField(max_length=80, verbose_name='name')),
- ('lft', models.PositiveIntegerField(editable=False)),
- ('rght', models.PositiveIntegerField(editable=False)),
- ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
- ('level', models.PositiveIntegerField(editable=False)),
- ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='pid', to='power.Route', verbose_name='上级')),
- ],
- options={
- 'abstract': False,
- },
- ),
- migrations.CreateModel(
- name='UserRoute',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('route', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ur_user', to='power.Route', verbose_name='路由')),
- ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ur_user', to=settings.AUTH_USER_MODEL, verbose_name='用户')),
- ],
- options={
- 'unique_together': {('user', 'route')},
- },
- ),
- ]
|