# Generated by Django 5.2.11 on 2026-04-07 20:00

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('invoices', '0001_initial'),
        ('projects', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Abonements',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('summa', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='Ikmēneša summa (EUR)')),
                ('apraksts', models.TextField(verbose_name='Rēķina apraksts (piem: Ikmēneša uzturēšana)')),
                ('izrakstisanas_diena', models.IntegerField(default=1, help_text='Kurā datumā katru mēnesi ģenerēt rēķinu?', verbose_name='Mēneša diena (1-28)')),
                ('aktivs', models.BooleanField(default=True, verbose_name='Vai abonements ir aktīvs?')),
                ('izveidots', models.DateTimeField(auto_now_add=True)),
                ('klients', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='abonementi', to=settings.AUTH_USER_MODEL, verbose_name='Klients')),
                ('projekts', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='projects.projekts', verbose_name='Projekts')),
            ],
            options={
                'verbose_name': 'Abonements',
                'verbose_name_plural': 'Abonementi',
            },
        ),
    ]
