123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- # 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='Dapt',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=50)),
- ('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='relation.Dapt', verbose_name='上级部门')),
- ],
- options={
- 'abstract': False,
- },
- ),
- migrations.CreateModel(
- name='Post',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=50)),
- ],
- ),
- migrations.CreateModel(
- name='PostUser',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pu_post', to='relation.Post', verbose_name='岗位')),
- ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pu_user', to=settings.AUTH_USER_MODEL, verbose_name='人员')),
- ],
- options={
- 'unique_together': {('post', 'user')},
- },
- ),
- migrations.CreateModel(
- name='DaptUser',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('dapt', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='du_dapt', to='relation.Dapt', verbose_name='部门')),
- ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='du_user', to=settings.AUTH_USER_MODEL, verbose_name='人员')),
- ],
- options={
- 'unique_together': {('dapt', 'user')},
- },
- ),
- migrations.CreateModel(
- name='DaptPost',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('dapt', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dp_dapt', to='relation.Dapt', verbose_name='部门')),
- ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dp_post', to='relation.Post', verbose_name='岗位')),
- ],
- options={
- 'unique_together': {('dapt', 'post')},
- },
- ),
- ]
|