# Generated by Django 5.2.7 on 2026-01-27 20:11

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


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0004_fleetunit_insurance_company_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='Supplier',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Наименование компании')),
                ('representative_name', models.CharField(blank=True, max_length=255, null=True, verbose_name='ФИО представителя/менеджера')),
                ('phone', models.CharField(blank=True, max_length=50, null=True, verbose_name='Телефон')),
                ('email', models.EmailField(blank=True, max_length=254, null=True, verbose_name='Электронная почта')),
                ('contract_number', models.CharField(blank=True, max_length=100, null=True, verbose_name='Номер договора')),
            ],
            options={
                'verbose_name': 'Поставщик / Контрагент',
                'verbose_name_plural': 'Поставщики / Контрагенты',
            },
        ),
        migrations.AddField(
            model_name='fleetunit',
            name='insurance_policy_number',
            field=models.CharField(blank=True, max_length=100, null=True, verbose_name='Номер страхового полиса'),
        ),
        migrations.AlterField(
            model_name='fleetunit',
            name='supplier_contacts',
            field=models.TextField(blank=True, null=True, verbose_name='Контакты поставщика (старое)'),
        ),
        migrations.AlterField(
            model_name='fleetunit',
            name='supplier_name',
            field=models.CharField(blank=True, max_length=255, null=True, verbose_name='Поставщик (старое)'),
        ),
        migrations.AddField(
            model_name='fleetunit',
            name='supplier',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='core.supplier', verbose_name='Поставщик / Контрагент'),
        ),
    ]
