0002_daptpost_daptuser_postuser.py 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Generated by Django 3.0.8 on 2020-07-24 07:50
  2. from django.conf import settings
  3. from django.db import migrations, models
  4. import django.db.models.deletion
  5. class Migration(migrations.Migration):
  6. dependencies = [
  7. migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  8. ('relation', '0001_initial'),
  9. ]
  10. operations = [
  11. migrations.CreateModel(
  12. name='PostUser',
  13. fields=[
  14. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  15. ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pu_post', to='relation.Post', verbose_name='岗位')),
  16. ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pu_user', to=settings.AUTH_USER_MODEL, verbose_name='人员')),
  17. ],
  18. options={
  19. 'unique_together': {('post', 'user')},
  20. },
  21. ),
  22. migrations.CreateModel(
  23. name='DaptUser',
  24. fields=[
  25. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  26. ('dapt', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='du_dapt', to='relation.Dapt', verbose_name='部门')),
  27. ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='du_user', to=settings.AUTH_USER_MODEL, verbose_name='人员')),
  28. ],
  29. options={
  30. 'unique_together': {('dapt', 'user')},
  31. },
  32. ),
  33. migrations.CreateModel(
  34. name='DaptPost',
  35. fields=[
  36. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  37. ('dapt', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dp_dapt', to='relation.Dapt', verbose_name='部门')),
  38. ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dp_post', to='relation.Post', verbose_name='岗位')),
  39. ],
  40. options={
  41. 'unique_together': {('dapt', 'post')},
  42. },
  43. ),
  44. ]