# Generated by Django 5.1.6 on 2025-03-06 10:01

import django.core.validators
from decimal import Decimal
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('webapp', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Invoice',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('api_id', models.CharField(max_length=255, unique=True, verbose_name='API Invoice ID')),
                ('invoice_type', models.CharField(default='Invoice', max_length=50, verbose_name='Type')),
                ('created_at', models.DateTimeField(verbose_name='Created at')),
                ('closed_at', models.DateTimeField(blank=True, null=True, verbose_name='Closed at')),
                ('ext_id', models.CharField(blank=True, max_length=255, null=True, verbose_name='External ID')),
                ('ext_type', models.CharField(blank=True, max_length=255, null=True, verbose_name='External Type')),
                ('client_api_id', models.CharField(blank=True, max_length=255, null=True, verbose_name='Client API ID')),
                ('client_type', models.CharField(blank=True, max_length=50, null=True, verbose_name='Client Type')),
                ('client_name', models.CharField(blank=True, max_length=255, null=True, verbose_name='Client Name')),
                ('client_club_card_number', models.CharField(blank=True, max_length=100, null=True, verbose_name='Club Card Number')),
                ('sum', models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=10, validators=[django.core.validators.MinValueValidator(Decimal('0.00'))], verbose_name='Sum')),
                ('company_number', models.PositiveIntegerField(default=0, verbose_name='Company Number')),
                ('bonus', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True, validators=[django.core.validators.MinValueValidator(Decimal('0.00'))], verbose_name='Bonus')),
                ('start_bonus', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True, validators=[django.core.validators.MinValueValidator(Decimal('0.00'))], verbose_name='Start Bonus')),
                ('deposit_sum', models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=10, validators=[django.core.validators.MinValueValidator(Decimal('0.00'))], verbose_name='Deposit Sum')),
                ('notes', models.TextField(blank=True, null=True, verbose_name='Notes')),
            ],
            options={
                'verbose_name': 'Invoice',
                'verbose_name_plural': 'Invoices',
                'ordering': ['-created_at'],
            },
        ),
    ]
