Django Library PaTT
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

0001_initial.py 4.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # Generated by Django 2.2.5 on 2019-09-30 16:58
  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. initial = True
  7. dependencies = [
  8. migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  9. ]
  10. operations = [
  11. migrations.CreateModel(
  12. name='Project',
  13. fields=[
  14. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  15. ('name', models.CharField(max_length=128)),
  16. ('description', models.TextField(blank=True, default='')),
  17. ('state', models.IntegerField(choices=[(0, 'Open'), (1, 'Closed')], default=0)),
  18. ('role_leader', models.ManyToManyField(related_name='role_leader', to=settings.AUTH_USER_MODEL)),
  19. ('role_member', models.ManyToManyField(blank=True, related_name='role_member', to=settings.AUTH_USER_MODEL)),
  20. ],
  21. ),
  22. migrations.CreateModel(
  23. name='TaskListSetting',
  24. fields=[
  25. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  26. ('name', models.CharField(default='All', max_length=50)),
  27. ('projectfilter', models.CharField(default='all', max_length=50)),
  28. ('userfilter', models.CharField(default='all', max_length=50)),
  29. ('statefilter', models.CharField(default='0,1,2,3', max_length=50)),
  30. ('displaytype', models.CharField(default='short', max_length=50)),
  31. ('sorttype', models.CharField(default='date', max_length=50)),
  32. ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
  33. ],
  34. ),
  35. migrations.CreateModel(
  36. name='UserProfile',
  37. fields=[
  38. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  39. ('current_tasklistsetting', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='patt.TaskListSetting')),
  40. ('my_tasklistsettings', models.ManyToManyField(related_name='my_tasklistsettings', to='patt.TaskListSetting')),
  41. ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
  42. ],
  43. ),
  44. migrations.CreateModel(
  45. name='Task',
  46. fields=[
  47. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  48. ('state', models.IntegerField(choices=[(0, 'Open'), (1, 'Finished'), (2, 'Closed'), (3, 'Canceled')], default=0)),
  49. ('priority', models.IntegerField(choices=[(1, '1 - Highest'), (2, '2 - High'), (3, '3 - Above-Average'), (4, '4 - Average'), (5, '5 - Below-Average'), (6, '6 - Low'), (7, '7 - Lowest')], default=4)),
  50. ('targetdate', models.DateField(blank=True, null=True)),
  51. ('progress', models.IntegerField(choices=[(0, '0 %'), (10, '10 %'), (20, '20 %'), (30, '30 %'), (40, '40 %'), (50, '50 %'), (60, '60 %'), (70, '70 %'), (80, '80 %'), (90, '90 %'), (100, '100 %')], default=0)),
  52. ('name', models.CharField(default='', max_length=150)),
  53. ('description', models.TextField(blank=True, default='')),
  54. ('creation_date', models.DateTimeField(auto_now_add=True)),
  55. ('assigned_user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
  56. ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='patt.Project')),
  57. ],
  58. ),
  59. migrations.CreateModel(
  60. name='Comment',
  61. fields=[
  62. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  63. ('type', models.IntegerField(choices=[(1, 'Appraisal'), (0, 'Comment')], default=0)),
  64. ('creation_date', models.DateTimeField(auto_now_add=True)),
  65. ('description', models.TextField()),
  66. ('task', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='patt.Task')),
  67. ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
  68. ],
  69. ),
  70. ]