# Generated by Django 5.0 on 2024-03-29 12:02

import django.contrib.auth.models
import django.contrib.auth.validators
import django.db.models.deletion
import django.utils.timezone
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Cable',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(max_length=100)),
                ('type', models.CharField(blank=True, max_length=100, null=True)),
                ('start_from', models.CharField(choices=[('POP', 'POP'), ('CLIENT', 'Client'), ('TJ_BOX', 'TJ BOX'), ('RESELLER', 'Reseller')], max_length=100)),
                ('end_to', models.CharField(choices=[('POP', 'POP'), ('CLIENT', 'Client'), ('TJ_BOX', 'TJ BOX'), ('RESELLER', 'Reseller')], max_length=100)),
                ('number_of_cores', models.IntegerField()),
                ('length', models.FloatField(blank=True, null=True)),
                ('notes', models.TextField(blank=True, null=True)),
                ('description', models.TextField(blank=True, null=True)),
                ('polyline', models.TextField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Marker',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(blank=True, max_length=100, null=True)),
                ('type', models.CharField(choices=[('POP', 'POP'), ('CLIENT', 'Client'), ('TJ_BOX', 'TJ BOX'), ('RESELLER', 'Reseller')], max_length=100)),
                ('latitude', models.FloatField()),
                ('longitude', models.FloatField()),
                ('address', models.CharField(blank=True, max_length=200, null=True)),
                ('notes', models.TextField(blank=True, null=True)),
                ('description', models.TextField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('gender', models.CharField(blank=True, choices=[('male', 'Male'), ('female', 'Female'), ('other', 'Other')], max_length=10, null=True)),
                ('biography', models.TextField(blank=True, null=True)),
                ('contact_number', models.CharField(blank=True, max_length=20, null=True)),
                ('address', models.CharField(blank=True, max_length=255, null=True)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Core',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('core_number', models.IntegerField()),
                ('color', models.CharField(max_length=100)),
                ('assigned', models.BooleanField()),
                ('cable', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='map.cable')),
            ],
        ),
        migrations.CreateModel(
            name='Connection',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('core_from', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='core_from', to='map.core')),
                ('core_to', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='core_to', to='map.core')),
            ],
        ),
        migrations.CreateModel(
            name='Gpon',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(blank=True, max_length=100, null=True)),
                ('name', models.CharField(max_length=100)),
                ('splitter', models.IntegerField()),
                ('input_cable', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='map.cable')),
                ('input_core', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='input_core', to='map.core')),
                ('marker', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='map.marker')),
            ],
        ),
        migrations.AddField(
            model_name='core',
            name='splitter',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='map.gpon'),
        ),
        migrations.AddField(
            model_name='core',
            name='marker',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='map.marker'),
        ),
        migrations.CreateModel(
            name='Client',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(blank=True, max_length=100, null=True)),
                ('name', models.CharField(max_length=100)),
                ('mobile_number', models.CharField(blank=True, max_length=100, null=True)),
                ('marker', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='map.marker')),
            ],
        ),
        migrations.AddField(
            model_name='cable',
            name='ending_point',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ending_point', to='map.marker'),
        ),
        migrations.AddField(
            model_name='cable',
            name='starting_point',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='starting_point', to='map.marker'),
        ),
        migrations.CreateModel(
            name='POP',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(blank=True, max_length=100, null=True)),
                ('name', models.CharField(max_length=100)),
                ('pop_type', models.CharField(choices=[('OLT', 'Olt'), ('Switch', 'Switch')], max_length=100)),
                ('marker', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='map.marker')),
            ],
        ),
        migrations.CreateModel(
            name='Reseller',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(blank=True, max_length=100, null=True)),
                ('name', models.CharField(max_length=100)),
                ('mobile_number', models.CharField(blank=True, max_length=100, null=True)),
                ('marker', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='map.marker')),
            ],
        ),
        migrations.CreateModel(
            name='TJBox',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(blank=True, max_length=100, null=True)),
                ('name', models.CharField(max_length=100)),
                ('marker', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='map.marker')),
            ],
        ),
        migrations.AddField(
            model_name='gpon',
            name='tj_box',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='map.tjbox'),
        ),
    ]
