# Generated by Django 3.0.4 on 2020-03-22 09:26

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Car',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('car_number', models.CharField(max_length=8)),
                ('brand', models.CharField(max_length=30)),
                ('model', models.CharField(max_length=30)),
                ('color', models.CharField(max_length=30)),
            ],
            options={
                'db_table': 'Car',
            },
        ),
        migrations.CreateModel(
            name='DriverLicense',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('license_number', models.IntegerField()),
                ('date_of_issue', models.DateField()),
                ('category', models.CharField(choices=[('A', 'Class A'), ('A1', 'Class A1'), ('B', 'Class B'), ('B1', 'Class B1'), ('C', 'Class C'), ('C1', 'Class C1'), ('D', 'Class D'), ('D1', 'Class D1'), ('BE', 'Class BE'), ('CE', 'Class CE'), ('C1E', 'Class C1E'), ('DE', 'Class DE'), ('D1E', 'Class D1E'), ('M', 'Class M'), ('Tm', 'Class Tm'), ('Tb', 'Class Tb')], max_length=3)),
            ],
            options={
                'db_table': 'DriverLicense',
            },
        ),
        migrations.CreateModel(
            name='Owner',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=30)),
                ('last_name', models.CharField(max_length=30)),
                ('date_of_birth', models.DateField()),
                ('passport', models.IntegerField(default='0000000000')),
                ('address', models.CharField(max_length=150, default='city-street-house-flat')),
                ('nationality', models.CharField(max_length=30, default='not_stated'))
            ],
            options={
                'db_table': 'Owner',
            },
        ),
        migrations.CreateModel(
            name='Ownership',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_of_start', models.DateField()),
                ('date_of_end', models.DateField()),
                ('car', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='project_first_app.Car')),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='project_first_app.Owner')),
            ],
            options={
                'db_table': 'Ownership',
            },
        ),
    ]
