# Generated by Django 3.2.12 on 2022-06-20 10:14

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

import audoma.django.db.fields


class Migration(migrations.Migration):

    dependencies = [
        ("audoma_api", "0002_alter_examplemodel_json_and_more"),
    ]

    operations = [
        migrations.CreateModel(
            name="Manufacturer",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", audoma.django.db.fields.CharField(max_length=255)),
                ("slug_name", audoma.django.db.fields.SlugField()),
            ],
        ),
        migrations.CreateModel(
            name="Car",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", audoma.django.db.fields.CharField(max_length=255)),
                (
                    "body_type",
                    audoma.django.db.fields.IntegerField(
                        choices=[
                            (1, "Sedan"),
                            (2, "Coupe"),
                            (3, "Hatchback"),
                            (4, "Pickup Truck"),
                        ]
                    ),
                ),
                ("engine_size", audoma.django.db.fields.FloatField()),
                (
                    "engine_type",
                    audoma.django.db.fields.IntegerField(
                        choices=[
                            (1, "Petrol"),
                            (2, "Diesel"),
                            (3, "Electric"),
                            (4, "Hybrid"),
                        ]
                    ),
                ),
                (
                    "manufacturer",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="audoma_api.manufacturer",
                    ),
                ),
            ],
        ),
    ]
