text: # Generated by Django 3.2.8 on 2021-11-18 17:46
  
  import django.contrib.auth.models
  import django.contrib.auth.validators
  from django.db import migrations, models
  import django.db.models.deletion
  import django.utils.timezone
  import uuid
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
          ('auth', '0012_alter_user_first_name_max_length'),
      ]
  
      operations = [
          migrations.CreateModel(
              name='User',
              fields=[
                  ('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')),
                  ('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')),
                  ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                  ('email', models.EmailField(max_length=254, unique=True)),
                  ('phone_number', models.CharField(help_text='User phone number', max_length=31)),
                  ('avatar', models.ImageField(help_text='Image for the avatar', null=True, upload_to='avatars')),
                  ('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')),
              ],
              options={
                  'verbose_name': 'user',
                  'verbose_name_plural': 'users',
                  'abstract': False,
              },
              managers=[
                  ('objects', django.contrib.auth.models.UserManager()),
              ],
          ),
          migrations.CreateModel(
              name='PerformerSpecialization',
              fields=[
                  ('performer_specialization_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                  ('performer_specialization', models.CharField(choices=[('Plumber', 'Plumber'), ('Electrician', 'Electrician'), ('Caretaker', 'Caretaker'), ('Carpenter', 'Carpenter'), ('Cobbler', 'Cobbler'), ('Gardener', 'Gardener'), ('Mechanic', 'Mechanic'), ('Roofer', 'Roofer'), ('Tiler', 'Tiler')], help_text='Performer specializations', max_length=16)),
              ],
          ),
          migrations.CreateModel(
              name='PerformerStatus',
              fields=[
                  ('performer_status_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                  ('performer_status', models.CharField(choices=[('NO', 'no orders today'), ('OVER', 'the working day is over'), ('MAKING', 'making order'), ('FINISHED', 'finished order')], help_text='Performer specializations', max_length=16)),
              ],
              options={
                  'verbose_name': 'Performer status',
                  'verbose_name_plural': 'Performer statuses',
              },
          ),
          migrations.CreateModel(
              name='Role',
              fields=[
                  ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                  ('role', models.CharField(choices=[('ADMN', 'admin'), ('CUST', 'customer'), ('PERF', 'performer')], help_text='User role', max_length=16)),
              ],
          ),
          migrations.CreateModel(
              name='Admin',
              fields=[
                  ('user_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='users.user')),
              ],
              options={
                  'verbose_name': 'Admin',
                  'verbose_name_plural': 'Admins',
              },
              bases=('users.user',),
              managers=[
                  ('objects', django.contrib.auth.models.UserManager()),
              ],
          ),
          migrations.CreateModel(
              name='Customer',
              fields=[
                  ('user_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='users.user')),
                  ('address', models.TextField(blank=True, help_text="Customer's address", null=True)),
                  ('latitude', models.FloatField(blank=True, help_text="Customer's address latitude", null=True)),
                  ('longitude', models.FloatField(blank=True, help_text="Customer's address longitude", null=True)),
                  ('is_blocked', models.BooleanField(default=False, help_text='True if user is blocked by Admin')),
              ],
              options={
                  'verbose_name': 'Customer',
                  'verbose_name_plural': 'Customers',
              },
              bases=('users.user',),
              managers=[
                  ('objects', django.contrib.auth.models.UserManager()),
              ],
          ),
          migrations.AddField(
              model_name='user',
              name='role_id',
              field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='users.role'),
          ),
          migrations.AddField(
              model_name='user',
              name='user_permissions',
              field=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'),
          ),
          migrations.CreateModel(
              name='Performer',
              fields=[
                  ('user_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='users.user')),
                  ('work_day_start', models.TimeField(help_text="Performer's work day start", null=True)),
                  ('work_day_end', models.TimeField(help_text="Performer's work day end", null=True)),
                  ('latitude', models.FloatField(help_text="Performer's last order latitude", null=True)),
                  ('longitude', models.FloatField(help_text="Performer's last order longitude", null=True)),
                  ('description', models.TextField(help_text='Few words of the Performer about himself/herself', null=True)),
                  ('avg_price_per_hour', models.FloatField(help_text='Average price per hour', null=True)),
                  ('is_blocked', models.BooleanField(default=False, help_text='True if user is blocked by Admin')),
                  ('performer_specialization_id', models.ForeignKey(help_text="ID of the Performer's  specialization from the PerformerSpecialization table", null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='users.performerspecialization')),
                  ('status_is', models.ForeignKey(help_text="ID of the Performer's current status from the PerformerStatus table", null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='users.performerstatus')),
              ],
              options={
                  'verbose_name': 'Performer',
                  'verbose_name_plural': 'Performers',
              },
              bases=('users.user',),
              managers=[
                  ('objects', django.contrib.auth.models.UserManager()),
              ],
          ),
      ]
  