# Generated by Django 3.1 on 2023-06-13 17:59

import api.models
from django.db import migrations, models
import django.db.models.deletion
import django_countries.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Business',
            fields=[
                ('id', models.CharField(default=api.models._createId, max_length=16, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('manager_full_name', models.CharField(max_length=128)),
                ('country', django_countries.fields.CountryField(max_length=2)),
                ('manager_mobile', models.CharField(max_length=20, unique=True)),
                ('name', models.CharField(max_length=128)),
                ('email', models.EmailField(blank=True, max_length=254, null=True)),
                ('phone', models.CharField(blank=True, max_length=20, null=True)),
                ('address', models.TextField(blank=True, null=True)),
                ('web_site', models.CharField(blank=True, max_length=64, null=True)),
                ('instagram', models.CharField(blank=True, max_length=64, null=True)),
                ('icon', models.ImageField(null=True, upload_to='media')),
            ],
        ),
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id', models.CharField(default=api.models._createId, max_length=16, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('country_code', models.CharField(max_length=6)),
                ('mobile', models.CharField(max_length=20)),
                ('full_name', models.CharField(max_length=128)),
                ('is_male', models.BooleanField(blank=True, null=True)),
                ('dob', models.DateField(blank=True, null=True)),
                ('email', models.EmailField(blank=True, max_length=254, null=True)),
                ('amount', models.DecimalField(blank=True, decimal_places=2, max_digits=15, null=True)),
                ('delivery_date', models.DateTimeField(blank=True, null=True)),
                ('last_feedback_date', models.DateTimeField(null=True)),
                ('business', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.business')),
            ],
        ),
        migrations.CreateModel(
            name='Industry',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('name', models.CharField(max_length=128)),
            ],
        ),
        migrations.CreateModel(
            name='Rating',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('rate', models.PositiveSmallIntegerField()),
                ('description', models.TextField(blank=True, null=True)),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.customer')),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('name', models.CharField(max_length=128)),
                ('industry', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='api.industry')),
            ],
        ),
        migrations.AddField(
            model_name='customer',
            name='products',
            field=models.ManyToManyField(blank=True, to='api.Product'),
        ),
        migrations.AddField(
            model_name='business',
            name='industry',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='api.industry'),
        ),
    ]
