# Generated by Django 4.2.17 on 2024-12-18 18:57

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import phonenumber_field.modelfields


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('main', '0002_contact'),
    ]

    operations = [
        migrations.CreateModel(
            name='Codes',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(blank=True, max_length=200)),
            ],
            options={
                'verbose_name_plural': 'code Zip',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='Countries',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('country', models.CharField(blank=True, max_length=200)),
            ],
            options={
                'verbose_name_plural': 'Pays',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='Courses',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=33)),
                ('slug', models.SlugField(blank=True, null=True, unique=True)),
                ('price', models.DecimalField(decimal_places=2, default=0.0, max_digits=19)),
                ('description', models.TextField(blank=True)),
                ('status', models.CharField(blank=True, choices=[('Online', 'Online'), ('Facetoface', 'Facetoface'), ('Blended', 'Blended')], default='Online', max_length=30, null=True)),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_updated', models.DateTimeField(auto_now=True)),
                ('active', models.BooleanField(default=False)),
                ('category', models.ManyToManyField(to='main.categories')),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Courses',
                'ordering': ['date_created'],
            },
        ),
        migrations.CreateModel(
            name='Partners',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=50)),
                ('slug', models.SlugField(blank=True, null=True, unique=True)),
                ('image', models.ImageField(upload_to='main/images')),
            ],
            options={
                'verbose_name_plural': 'Partners',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='Wilayas',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=200)),
                ('slug', models.SlugField(blank=True, null=True, unique=True)),
                ('size', models.IntegerField(blank=True, null=True)),
                ('image', models.ImageField(blank=True, null=True, upload_to='main/images')),
            ],
            options={
                'verbose_name_plural': 'Wilayas',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='Testimonials',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('testimonial', models.TextField()),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Testimonials',
                'ordering': ['date_created'],
            },
        ),
        migrations.CreateModel(
            name='School',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=33)),
                ('city', models.CharField(blank=True, max_length=33)),
                ('slug', models.SlugField(blank=True, null=True, unique=True)),
                ('description', models.TextField(blank=True)),
                ('logo', models.ImageField(upload_to='main/images')),
                ('banner', models.ImageField(upload_to='main/images')),
                ('email', models.EmailField(max_length=254)),
                ('facebook', models.URLField(blank=True, null=True)),
                ('instagram', models.URLField(blank=True, null=True)),
                ('linkedin', models.URLField(blank=True, null=True)),
                ('youtube', models.URLField(blank=True, null=True)),
                ('website', models.URLField(blank=True, null=True)),
                ('whatsapp', phonenumber_field.modelfields.PhoneNumberField(blank=True, max_length=128, null=True, region=None)),
                ('maps', models.URLField(blank=True, null=True)),
                ('location', models.TextField(blank=True)),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_updated', models.DateTimeField(auto_now=True)),
                ('active', models.BooleanField(default=False)),
                ('sponsored', models.BooleanField(default=False)),
                ('category', models.ManyToManyField(related_name='product_categories', to='main.categories')),
                ('code', models.ManyToManyField(blank=True, related_name='code_store', to='main.codes')),
                ('country', models.ManyToManyField(blank=True, related_name='country_store', to='main.countries')),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('partner', models.ManyToManyField(blank=True, to='main.partners')),
                ('wilaya', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='main.wilayas')),
            ],
            options={
                'verbose_name_plural': 'Schools',
                'ordering': ['date_created'],
            },
        ),
        migrations.CreateModel(
            name='Phones',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=200)),
                ('phone', phonenumber_field.modelfields.PhoneNumberField(max_length=128, region=None)),
                ('school', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='main.school')),
            ],
            options={
                'verbose_name_plural': 'Numéros Téléphone',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='Images',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=33)),
                ('file', models.ImageField(blank=True, null=True, upload_to='main/images')),
                ('course', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='main.courses')),
            ],
            options={
                'verbose_name_plural': 'Images',
                'ordering': ['id'],
            },
        ),
        migrations.AddField(
            model_name='courses',
            name='partner',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.partners'),
        ),
        migrations.AddField(
            model_name='courses',
            name='school',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='main.school'),
        ),
        migrations.CreateModel(
            name='Cities',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('city', models.CharField(blank=True, max_length=200)),
                ('wilaya', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='main.wilayas')),
            ],
            options={
                'verbose_name_plural': 'Villes',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='Addresses',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=200)),
                ('address', models.TextField()),
                ('school', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='main.school')),
            ],
            options={
                'verbose_name_plural': 'Adresses',
                'ordering': ['id'],
            },
        ),
    ]
