# Generated by Django 6.1 on 2026-08-26 11:38 import django.db.models.deletion import uuid from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('contacts', '0001_initial'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='Invoice', fields=[ ('created_at', models.DateTimeField(auto_now_add=True)), ('updated_at', models.DateTimeField(auto_now=True)), ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), ('number', models.CharField(max_length=32, unique=True)), ('description', models.CharField(max_length=255)), ('amount', models.DecimalField(decimal_places=2, max_digits=10)), ('currency', models.CharField(default='usd', max_length=8)), ('status', models.CharField(choices=[('draft', 'Draft'), ('open', 'Open'), ('paid', 'Paid'), ('void', 'Void'), ('uncollectible', 'Uncollectible')], default='draft', max_length=16)), ('due_date', models.DateField(blank=True, null=True)), ('stripe_invoice_id', models.CharField(blank=True, max_length=255)), ('stripe_checkout_session_id', models.CharField(blank=True, max_length=255)), ('hosted_invoice_url', models.URLField(blank=True)), ('paid_at', models.DateTimeField(blank=True, null=True)), ('notes', models.TextField(blank=True)), ('contact', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='invoices', to='contacts.contact')), ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='created_invoices', to=settings.AUTH_USER_MODEL)), ], options={ 'ordering': ['-created_at'], }, ), ]