# Generated by Django 6.0.5 on 2026-05-14 19:37

import django.db.models.deletion
import gaehsnitz.models
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("gaehsnitz", "0005_alter_consumption_options_alter_donation_options_and_more"),
    ]

    operations = [
        migrations.CreateModel(
            name="UserPayment",
            fields=[
                ("id", models.SmallAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("amount", gaehsnitz.models.PriceField(decimal_places=2, max_digits=6, verbose_name="Betrag")),
                (
                    "method",
                    models.CharField(
                        choices=[
                            ("cash", "Bar"),
                            ("paypal", "PayPal"),
                            ("bank", "Überweisung"),
                            ("other", "Sonstiges"),
                        ],
                        max_length=16,
                        verbose_name="Methode",
                    ),
                ),
                ("note", models.CharField(blank=True, default="", max_length=64, verbose_name="Notiz")),
                ("created_at", models.DateTimeField(auto_now_add=True, verbose_name="Bezahlt am")),
                (
                    "user",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="user_payments",
                        related_query_name="user_payment",
                        to=settings.AUTH_USER_MODEL,
                        verbose_name="Benutzer",
                    ),
                ),
            ],
            options={
                "verbose_name": "Zahlung",
                "verbose_name_plural": "Zahlungen",
            },
        ),
    ]
