# Generated by Django 4.2.6 on 2025-04-13 13:25

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="Expense",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("title", models.CharField(max_length=255, verbose_name="Intitulé")),
                (
                    "license_plate",
                    models.CharField(max_length=10, verbose_name="Plaque d'immatriculation"),
                ),
                (
                    "amount",
                    models.DecimalField(decimal_places=2, max_digits=10, verbose_name="Montant"),
                ),
                ("date", models.DateField(verbose_name="Date")),
                (
                    "created_at",
                    models.DateTimeField(auto_now_add=True, verbose_name="Date de création"),
                ),
                (
                    "updated_at",
                    models.DateTimeField(auto_now=True, verbose_name="Date de modification"),
                ),
                (
                    "linked_user",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to=settings.AUTH_USER_MODEL,
                        verbose_name="Utilisateur",
                    ),
                ),
            ],
            options={
                "verbose_name": "Dépense",
                "verbose_name_plural": "Dépenses",
                "ordering": ["-date"],
            },
        ),
    ]
