1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-12-24 16:32:21 +00:00
nk20/activity/migrations/0001_initial.py

77 lines
3.3 KiB
Python
Raw Normal View History

2019-07-16 11:54:32 +00:00
# Generated by Django 2.2.3 on 2019-07-16 11:53
2019-07-16 10:43:23 +00:00
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),
2019-07-16 11:54:32 +00:00
('note', '0001_initial'),
2019-07-16 10:43:23 +00:00
('member', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Activity',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255, verbose_name='name')),
('description', models.TextField(verbose_name='description')),
('date_start', models.DateTimeField(verbose_name='start date')),
('date_end', models.DateTimeField(verbose_name='end date')),
],
2019-07-16 11:50:05 +00:00
options={
'verbose_name': 'activity',
'verbose_name_plural': 'activities',
},
2019-07-16 10:43:23 +00:00
),
migrations.CreateModel(
name='ActivityType',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255, verbose_name='name')),
('can_invite', models.BooleanField(verbose_name='can invite')),
('guest_entry_fee', models.PositiveIntegerField(verbose_name='guest entry fee')),
],
2019-07-16 11:50:05 +00:00
options={
'verbose_name': 'activity type',
'verbose_name_plural': 'activity types',
},
2019-07-16 10:43:23 +00:00
),
migrations.CreateModel(
name='Guest',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255)),
('entry', models.DateTimeField(null=True)),
('activity', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to='activity.Activity')),
('entry_transaction', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='note.Transaction')),
('inviter', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to=settings.AUTH_USER_MODEL)),
],
2019-07-16 11:50:05 +00:00
options={
'verbose_name': 'guest',
'verbose_name_plural': 'guests',
},
2019-07-16 10:43:23 +00:00
),
migrations.AddField(
model_name='activity',
name='activity_type',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to='activity.ActivityType', verbose_name='type'),
),
migrations.AddField(
model_name='activity',
name='attendees_club',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to='member.Club', verbose_name='attendees club'),
),
migrations.AddField(
model_name='activity',
name='organizer',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to='member.Club', verbose_name='organizer'),
),
]