# Generated by Django 5.0.1 on 2026-06-29 10:52

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('members', '0008_bilingual_tamil_fields'),
    ]

    operations = [
        migrations.CreateModel(
            name='TaxMaster',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=300, verbose_name='Tax Name')),
                ('description', models.TextField(blank=True, default='')),
                ('base_amount', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='Base Tax Amount per Count')),
                ('is_active', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
        migrations.AddField(
            model_name='child',
            name='marital_status',
            field=models.CharField(choices=[('Unmarried', 'Unmarried'), ('Married', 'Married')], default='Unmarried', max_length=20, verbose_name='Marital Status'),
        ),
        migrations.CreateModel(
            name='MemberTax',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tax_count', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='Calculated Tax Count')),
                ('total_tax', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='Total Tax Amount')),
                ('amount_paid', models.DecimalField(decimal_places=2, default=0.0, max_digits=10, verbose_name='Amount Paid')),
                ('amount_due', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='Amount Due')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('member', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='taxes', to='members.member')),
                ('tax', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='member_taxes', to='members.taxmaster')),
            ],
            options={
                'ordering': ['-created_at'],
                'unique_together': {('member', 'tax')},
            },
        ),
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.DecimalField(decimal_places=2, max_digits=10)),
                ('transaction_type', models.CharField(choices=[('Payment', 'Payment'), ('Refund', 'Refund')], default='Payment', max_length=20)),
                ('receipt_number', models.CharField(blank=True, max_length=100, unique=True)),
                ('payment_date', models.DateField(auto_now_add=True)),
                ('notes', models.TextField(blank=True, default='')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('member', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='transactions', to='members.member')),
                ('member_tax', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='transactions', to='members.membertax')),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
    ]
