# Generated by Django 6.0.5 on 2026-05-07 17:29

import django.db.models.deletion
import django.utils.timezone
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Gericht',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('ist_vegetarisch', models.BooleanField(default=False)),
                ('allergene', models.TextField(blank=True)),
            ],
        ),
        migrations.CreateModel(
            name='SpeiseplanTag',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('datum', models.DateField(unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Menue',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('preis', models.DecimalField(decimal_places=2, max_digits=5)),
                ('gericht', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mensa_app.gericht')),
                ('tag', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='menues', to='mensa_app.speiseplantag')),
            ],
        ),
        migrations.CreateModel(
            name='Person',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rolle', models.CharField(choices=[('schueler', 'Schüler'), ('lehrer', 'Lehrer')], max_length=20)),
                ('klasse', models.CharField(blank=True, max_length=10, null=True)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Bestellung',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('datum_bestellung', models.DateTimeField(default=django.utils.timezone.now)),
                ('status', models.CharField(choices=[('offen', 'Offen'), ('bezahlt', 'Bezahlt'), ('storniert', 'Storniert')], default='offen', max_length=10)),
                ('bezahlt', models.BooleanField(default=False)),
                ('menue', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mensa_app.menue')),
                ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mensa_app.person')),
            ],
        ),
    ]
