mirror of
https://github.com/more-tech4-magnum-opus/backend.git
synced 2024-11-25 20:53:42 +03:00
46 lines
1.9 KiB
Python
46 lines
1.9 KiB
Python
# Generated by Django 4.0.8 on 2022-10-08 15:44
|
|
|
|
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='Event',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=100)),
|
|
('slug', models.SlugField(max_length=8)),
|
|
('about', models.TextField(blank=True)),
|
|
('starts', models.DateTimeField()),
|
|
('image', models.ImageField(blank=True, upload_to='uploads/')),
|
|
('image_cropped', models.ImageField(blank=True, upload_to='cropped/')),
|
|
('planning', models.IntegerField(default=0)),
|
|
('attended', models.IntegerField(default=0)),
|
|
('creator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='events_created', to=settings.AUTH_USER_MODEL)),
|
|
],
|
|
options={
|
|
'ordering': ['-starts'],
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='EventAttendance',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('token', models.CharField(max_length=128, unique=True)),
|
|
('attended', models.BooleanField(default=False)),
|
|
('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='people', to='events.event')),
|
|
('worker', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='events', to=settings.AUTH_USER_MODEL)),
|
|
],
|
|
),
|
|
]
|