# Generated by Django 4.1.7 on 2023-02-20 07:50

import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='CustomUser',
            fields=[
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('id', models.AutoField(primary_key=True, serialize=False, unique=True)),
                ('username', models.CharField(max_length=50, unique=True, verbose_name='Username')),
                ('date_joined', models.DateTimeField(default=datetime.datetime.now)),
                ('user_type', models.CharField(choices=[('Trainer', 'Trainer'), ('Admin', 'Admin'), ('Customer', 'Customer')], default='Customer', max_length=20, verbose_name='User Type')),
                ('is_staff', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('is_superuser', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Customer_Details',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Name', models.CharField(max_length=100, verbose_name='Name')),
                ('Age', models.IntegerField(null=True, verbose_name='Age')),
                ('Email', models.CharField(blank=True, max_length=50, null=True, verbose_name='Email')),
                ('Address', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Type',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Name', models.CharField(max_length=100, unique=True, verbose_name='Package Type')),
            ],
        ),
        migrations.CreateModel(
            name='Trainer_Details',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Name', models.CharField(max_length=100, verbose_name='Name')),
                ('Age', models.IntegerField(null=True, verbose_name='Age')),
                ('Email', models.CharField(blank=True, max_length=50, null=True, verbose_name='Email')),
                ('Address', models.TextField()),
                ('Experience', models.IntegerField(null=True, verbose_name='Experience')),
                ('Salary', models.FloatField(blank=True, null=True)),
                ('Customer', models.ManyToManyField(blank=True, related_name='Customer', to='accounts.customer_details')),
                ('User', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Trainer_Details', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Package',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Name', models.CharField(max_length=100, unique=True, verbose_name='Package')),
                ('Price', models.IntegerField()),
                ('Description', models.TextField()),
                ('Type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='accounts.type')),
            ],
        ),
        migrations.AddField(
            model_name='customer_details',
            name='Package',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='accounts.package'),
        ),
        migrations.AddField(
            model_name='customer_details',
            name='Trainer',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='customer_details',
            name='User',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Customer_Details', to=settings.AUTH_USER_MODEL),
        ),
    ]
