# Generated by Django 3.2.6 on 2021-08-30 14:01

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=255, verbose_name='Название компании')),
                ('catch_phrase', models.CharField(max_length=255, verbose_name='catchPhrase')),
                ('bs', models.CharField(max_length=255, verbose_name='bs')),
            ],
            options={
                'verbose_name': 'Компания пользователя',
                'verbose_name_plural': 'Компании пользователей',
            },
        ),
        migrations.CreateModel(
            name='UserAddress',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('street', models.CharField(max_length=255, verbose_name='Улица')),
                ('suite', models.CharField(max_length=255, verbose_name='Suite')),
                ('city', models.CharField(max_length=100, verbose_name='Город')),
                ('zipcode', models.CharField(max_length=100, verbose_name='Почтовый индекс')),
                ('geo', models.JSONField(default=dict, verbose_name='Геолокация')),
            ],
            options={
                'verbose_name': 'Адрес пользователя',
                'verbose_name_plural': 'Адреса пользователей',
            },
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('id', models.IntegerField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255, verbose_name='Полное имя')),
                ('username', models.CharField(max_length=100, unique=True, verbose_name='Имя пользователя')),
                ('email', models.EmailField(max_length=254, verbose_name='Email')),
                ('phone_number', models.CharField(max_length=100, verbose_name='Номер телефона')),
                ('user_website', models.CharField(max_length=255, verbose_name='Веб-сайт пользователя')),
                ('user_address', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='strange_posts.useraddress', verbose_name='Адрес пользователя')),
                ('user_company', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='strange_posts.company', verbose_name='Компания пользователя')),
            ],
            options={
                'verbose_name': 'Пользователь',
                'verbose_name_plural': 'Пользователи',
            },
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('id', models.IntegerField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=255, verbose_name='Название поста')),
                ('body', models.TextField(verbose_name='Текст поста')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='strange_posts.user', verbose_name='Автор поста')),
            ],
            options={
                'verbose_name': 'Пост',
                'verbose_name_plural': 'Пользовательские посты',
            },
        ),
    ]
