# Copyright 2026 EcoFuture Technology Services LLC and contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Generated by Django 5.0.14 on 2025-05-22 11:43

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Country',
            fields=[
                ('dt_created', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='Creation time')),
                ('dt_updated', models.DateTimeField(auto_now=True, db_index=True, verbose_name='Update time')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255, unique=True, verbose_name='Country Name')),
            ],
            options={
                'verbose_name': 'Country',
                'verbose_name_plural': 'Countries',
                'abstract': False,
            },
            bases=(model_clone.mixin.CloneMixin, models.Model),
        ),
        migrations.CreateModel(
            name='Division',
            fields=[
                ('dt_created', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='Creation time')),
                ('dt_updated', models.DateTimeField(auto_now=True, db_index=True, verbose_name='Update time')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255)),
            ],
            options={
                'abstract': False,
            },
            bases=(model_clone.mixin.CloneMixin, models.Model),
        ),
        migrations.CreateModel(
            name='Organization',
            fields=[
                ('dt_created', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='Creation time')),
                ('dt_updated', models.DateTimeField(auto_now=True, db_index=True, verbose_name='Update time')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255)),
            ],
            options={
                'abstract': False,
            },
            bases=(model_clone.mixin.CloneMixin, models.Model),
        ),
        migrations.CreateModel(
            name='Vehicle',
            fields=[
                ('dt_created', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='Creation time')),
                ('dt_updated', models.DateTimeField(auto_now=True, db_index=True, verbose_name='Update time')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('gnum', models.CharField(max_length=50, unique=True, verbose_name='State Registration Number')),
            ],
            options={
                'verbose_name': 'Vehicle',
                'verbose_name_plural': 'Vehicles',
                'abstract': False,
            },
            bases=(model_clone.mixin.CloneMixin, models.Model),
        ),
        migrations.CreateModel(
            name='VehicleBrand',
            fields=[
                ('dt_created', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='Creation time')),
                ('dt_updated', models.DateTimeField(auto_now=True, db_index=True, verbose_name='Update time')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255, unique=True, verbose_name='Brand Name')),
            ],
            options={
                'verbose_name': 'Vehicle Brand',
                'verbose_name_plural': 'Vehicle Brands',
                'abstract': False,
            },
            bases=(model_clone.mixin.CloneMixin, models.Model),
        ),
        migrations.CreateModel(
            name='Driver',
            fields=[
                ('dt_created', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='Creation time')),
                ('dt_updated', models.DateTimeField(auto_now=True, db_index=True, verbose_name='Update time')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('first_name', models.CharField(max_length=255, verbose_name='First Name')),
                ('last_name', models.CharField(max_length=255, verbose_name='Last Name')),
                ('contact_phone', models.CharField(blank=True, max_length=50, null=True, verbose_name='Phone')),
                ('divisions', models.ManyToManyField(blank=True, related_name='drivers', to='route_injection.division')),
                ('org_owner', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='route_injection.organization')),
            ],
            options={
                'verbose_name': 'Driver',
                'verbose_name_plural': 'Drivers',
                'abstract': False,
            },
            bases=(model_clone.mixin.CloneMixin, models.Model),
        ),
        migrations.AddField(
            model_name='division',
            name='org_owner',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='route_injection.organization'),
        ),
        migrations.CreateModel(
            name='CarrierTask',
            fields=[
                ('dt_created', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='Creation time')),
                ('dt_updated', models.DateTimeField(auto_now=True, db_index=True, verbose_name='Update time')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('dt_start', models.DateTimeField(blank=True, null=True, verbose_name='Start Time')),
                ('dt_finish', models.DateTimeField(blank=True, null=True, verbose_name='Start Time')),
                ('fact_waste_weight', models.DecimalField(blank=True, decimal_places=3, max_digits=15, null=True, verbose_name='Fact Waste Weight, t')),
                ('driver', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='carrier_tasks', to='route_injection.driver', verbose_name='Driver')),
                ('org_owner', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='route_injection.organization')),
                ('vehicle', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='carrier_tasks', to='route_injection.vehicle', verbose_name='Vehicle')),
            ],
            options={
                'verbose_name': 'Carrier Task',
                'verbose_name_plural': 'Carrier Tasks',
                'abstract': False,
            },
            bases=(model_clone.mixin.CloneMixin, models.Model),
        ),
        migrations.CreateModel(
            name='VehicleAssembleInfo',
            fields=[
                ('dt_created', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='Creation time')),
                ('dt_updated', models.DateTimeField(auto_now=True, db_index=True, verbose_name='Update time')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('assembly_plant', models.CharField(max_length=50, verbose_name='Assembly Plant')),
                ('assembly_date', models.DateField(verbose_name='Assembly Date')),
                ('vin', models.CharField(max_length=17, unique=True, verbose_name='VIN')),
                ('country', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='route_injection.country', verbose_name='Country')),
                ('vehicle', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='assemble_info', to='route_injection.vehicle', verbose_name='Vehicle')),
            ],
            options={
                'abstract': False,
            },
            bases=(model_clone.mixin.CloneMixin, models.Model),
        ),
        migrations.CreateModel(
            name='VehicleModel',
            fields=[
                ('dt_created', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='Creation time')),
                ('dt_updated', models.DateTimeField(auto_now=True, db_index=True, verbose_name='Update time')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('model', models.CharField(max_length=255, unique=True, verbose_name='Model')),
                ('engine_type', models.CharField(blank=True, max_length=50, null=True, verbose_name='Engine Type')),
                ('capacity', models.DecimalField(blank=True, decimal_places=2, max_digits=6, null=True, verbose_name='Capacity, t')),
                ('brand', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='route_injection.vehiclebrand', verbose_name='Brand')),
            ],
            options={
                'verbose_name': 'Vehicle Model',
                'verbose_name_plural': 'Vehicle Models',
                'abstract': False,
                'unique_together': {('brand', 'model')},
            },
            bases=(model_clone.mixin.CloneMixin, models.Model),
        ),
        migrations.AddField(
            model_name='vehicle',
            name='vehicle_model',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='route_injection.vehiclemodel', verbose_name='Vehicle Model'),
        ),
    ]
