0001_initial.py 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Generated by Django 4.1.2 on 2022-12-17 10:43
  2. import datetime
  3. from django.db import migrations, models
  4. import django.db.models.deletion
  5. import zitap.models
  6. class Migration(migrations.Migration):
  7. initial = True
  8. dependencies = [
  9. ]
  10. operations = [
  11. migrations.CreateModel(
  12. name='Event',
  13. fields=[
  14. ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  15. ('url', models.CharField(default=zitap.models.generate_random_url, max_length=6, unique=True)),
  16. ('name', models.CharField(max_length=255)),
  17. ('slot_interval', models.DurationField(default=datetime.timedelta(seconds=900))),
  18. ('created_at', models.DateTimeField(auto_now_add=True)),
  19. ],
  20. ),
  21. migrations.CreateModel(
  22. name='Participant',
  23. fields=[
  24. ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  25. ('name', models.CharField(max_length=255)),
  26. ('pw_hash', models.CharField(max_length=255)),
  27. ('slots', models.BinaryField()),
  28. ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='zitap.event')),
  29. ],
  30. ),
  31. migrations.CreateModel(
  32. name='Date',
  33. fields=[
  34. ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  35. ('date', models.DateField()),
  36. ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='zitap.event')),
  37. ],
  38. ),
  39. ]