# Generated by Django 3.1.7 on 2021-04-19 17:05

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Pojazdy',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('marka', models.CharField(max_length=50)),
                ('model', models.CharField(max_length=50)),
                ('typ', models.CharField(max_length=30)),
                ('numer_rej', models.CharField(max_length=10)),
                ('ubezpieczenie', models.DateField()),
                ('ostatni_wyjazd', models.DateField()),
                ('status', models.CharField(max_length=50)),
                ('stan', models.CharField(max_length=50)),
                ('uwagi', models.TextField(blank=True)),
            ],
        ),
        migrations.CreateModel(
            name='Sprzet',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nazwa', models.CharField(max_length=300)),
                ('marka', models.CharField(max_length=50)),
                ('model', models.CharField(max_length=50)),
                ('parametry', models.TextField(blank=True)),
                ('rok_prod', models.PositiveIntegerField()),
                ('status', models.CharField(max_length=50)),
                ('stan', models.CharField(max_length=50)),
                ('uwagi', models.TextField(blank=True)),
            ],
        ),
        migrations.CreateModel(
            name='Strazacy',
            fields=[
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='auth.user')),
                ('data_urodzenia', models.DateField()),
                ('data_wstapienia', models.DateField()),
                ('ostatnie_badanie', models.DateField()),
                ('nastepne_badanie', models.DateField()),
                ('ubezpieczenie', models.DateField()),
                ('kierowca', models.BooleanField(default=False)),
                ('termin_prawa_jazdy', models.DateField(blank=True)),
                ('termin_wkladki', models.DateField(blank=True)),
                ('termin_kpp', models.DateField(blank=True)),
                ('ostatnia_skladka', models.PositiveIntegerField()),
                ('status', models.CharField(max_length=50)),
                ('uwagi', models.TextField(blank=True)),
            ],
        ),
        migrations.CreateModel(
            name='Uslugi',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('usluga', models.CharField(max_length=300)),
                ('nazwa_firmy', models.CharField(max_length=100)),
                ('adres_firmy', models.CharField(max_length=300)),
                ('miasto', models.CharField(max_length=30)),
                ('tel_kontaktowy', models.PositiveIntegerField()),
                ('termin_waznosci', models.DateField()),
                ('termin_oplaty', models.DateField()),
                ('kwota', models.DecimalField(decimal_places=2, max_digits=8)),
                ('uwagi', models.TextField(blank=True)),
                ('osoba_odpowiedzialna', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='uslugi_osoby', to='department.strazacy')),
            ],
        ),
        migrations.CreateModel(
            name='PrzegladSprzet',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ostatni_przeglad', models.DateField()),
                ('nastepny_przeglad', models.DateField(blank=True)),
                ('uwagi', models.TextField(blank=True)),
                ('mechanik', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='mechanik_sprzet', to='department.strazacy')),
                ('sprzet', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='przeglad_sprzet', to='department.sprzet')),
            ],
        ),
        migrations.CreateModel(
            name='PrzegladPojazdy',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ostatni_przeglad', models.DateField()),
                ('nastepny_przeglad', models.DateField()),
                ('ostatnia_wymiana_olej_filtr', models.DateField()),
                ('przebieg_przywymianie', models.PositiveIntegerField()),
                ('uwagi', models.TextField(blank=True)),
                ('mechanik', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='mechanik_pojazdy', to='department.strazacy')),
                ('pojazd', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='przeglad_pojazdy', to='department.pojazdy')),
            ],
        ),
    ]
