# Generated by Django 6.0.7 on 2026-07-14 17:23

import django.db.models.deletion
import uuid
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('invoicing', '0001_initial'),
        ('payments', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Receipt',
            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)),
                ('receipt_number', models.CharField(max_length=64, unique=True)),
                ('amount_paid', models.DecimalField(decimal_places=2, max_digits=14)),
                ('balance', models.DecimalField(decimal_places=2, default=0, max_digits=14)),
                ('payment_method', models.CharField(max_length=20)),
                ('payment_date', models.DateField()),
                ('authorized_signature', models.ImageField(blank=True, null=True, upload_to='receipt_signatures/')),
                ('invoice', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='receipts', to='invoicing.invoice')),
                ('payment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='receipts', to='payments.payment')),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
    ]
