# Generated by Django 2.2.6 on 2020-01-07 12:44

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


class Migration(migrations.Migration):

    dependencies = [
        ("resources", "0001_initial"),
        ("customers", "0001_initial"),
    ]

    operations = [
        migrations.CreateModel(
            name="Boat",
            fields=[
                (
                    "id",
                    models.UUIDField(
                        default=uuid.uuid4,
                        editable=False,
                        primary_key=True,
                        serialize=False,
                    ),
                ),
                (
                    "created_at",
                    models.DateTimeField(
                        auto_now_add=True, verbose_name="time created"
                    ),
                ),
                (
                    "modified_at",
                    models.DateTimeField(auto_now=True, verbose_name="time modified"),
                ),
                (
                    "registration_number",
                    models.CharField(
                        blank=True, max_length=64, verbose_name="registration number"
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        blank=True, max_length=255, verbose_name="boat name"
                    ),
                ),
                (
                    "model",
                    models.CharField(blank=True, max_length=64, verbose_name="model"),
                ),
                (
                    "length",
                    models.DecimalField(
                        decimal_places=2, max_digits=5, verbose_name="length"
                    ),
                ),
                (
                    "width",
                    models.DecimalField(
                        decimal_places=2, max_digits=5, verbose_name="width"
                    ),
                ),
                (
                    "draught",
                    models.DecimalField(
                        blank=True,
                        decimal_places=2,
                        max_digits=5,
                        null=True,
                        verbose_name="draught",
                    ),
                ),
                (
                    "weight",
                    models.DecimalField(
                        blank=True,
                        decimal_places=2,
                        max_digits=10,
                        null=True,
                        verbose_name="weight",
                    ),
                ),
                (
                    "propulsion",
                    models.CharField(
                        blank=True, max_length=64, verbose_name="propulsion"
                    ),
                ),
                (
                    "hull_material",
                    models.CharField(
                        blank=True, max_length=64, verbose_name="hull material"
                    ),
                ),
                (
                    "boat_is_inspected",
                    models.BooleanField(
                        blank=True, null=True, verbose_name="boat is inspected"
                    ),
                ),
                (
                    "boat_is_insured",
                    models.BooleanField(
                        blank=True, null=True, verbose_name="boat is insured"
                    ),
                ),
                (
                    "boat_type",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.PROTECT,
                        related_name="boats",
                        to="resources.BoatType",
                        verbose_name="boat type",
                    ),
                ),
                (
                    "owner",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="boats",
                        to="customers.CustomerProfile",
                        verbose_name="owner",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
    ]
