# Generated by Django 3.2.3 on 2021-05-23 21:58

import uuid

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Model',
            fields=[
                ('id', models.UUIDField(
                    default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('model_name', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='VehiclePart',
            fields=[
                ('id', models.UUIDField(
                    default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Vehicle',
            fields=[
                ('chassis_number', models.PositiveBigIntegerField(
                    primary_key=True, serialize=False)),
                ('model', models.ForeignKey(
                    null=True, on_delete=django.db.models.deletion.SET_NULL, to='vehicles.model')),
            ],
        ),
        migrations.AddField(
            model_name='model',
            name='model_parts',
            field=models.ManyToManyField(
                related_name='related_models', to='vehicles.VehiclePart'),
        ),
    ]
