# Generated by Django 3.2.3 on 2021-05-26 16:42

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Authors',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name_author', models.CharField(max_length=50, verbose_name='اسم المؤلف')),
                ('brief_about_author', models.CharField(blank=True, max_length=255, null=True, verbose_name='نبذه عن المؤلف')),
                ('photo_author', models.ImageField(blank=True, null=True, upload_to='authors/photo/', verbose_name='صورة')),
                ('publish', models.BooleanField(default=False, verbose_name='يتم نشره')),
            ],
            options={
                'verbose_name': 'مؤلف',
                'verbose_name_plural': 'مؤلفين',
            },
        ),
        migrations.CreateModel(
            name='Categories',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name_category', models.CharField(max_length=50, verbose_name='اسم الفئة')),
                ('brief_about_category', models.CharField(blank=True, max_length=255, null=True, verbose_name='نبذه عن الفئة')),
                ('photo_category', models.ImageField(blank=True, null=True, upload_to='categories/photo/', verbose_name='صورة')),
                ('publish', models.BooleanField(default=False, verbose_name='يتم نشره')),
            ],
            options={
                'verbose_name': 'فئة',
                'verbose_name_plural': 'الفئات',
            },
        ),
        migrations.CreateModel(
            name='Publishers',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name_publisher', models.CharField(max_length=50, verbose_name='اسم دار النشر')),
                ('address_publisher', models.CharField(blank=True, max_length=255, null=True, verbose_name='العنوان')),
                ('phone_publisher', models.PositiveIntegerField(blank=True, null=True, verbose_name='الهاتف')),
                ('site_publisher', models.URLField(blank=True, null=True, verbose_name='الموقع')),
                ('logo_publisher', models.ImageField(blank=True, null=True, upload_to='publishers/logos/', verbose_name='الشعار')),
                ('publish', models.BooleanField(default=False, verbose_name='يتم نشره')),
            ],
            options={
                'verbose_name': 'دار النشر',
                'verbose_name_plural': 'دور النشر',
            },
        ),
        migrations.CreateModel(
            name='Stores',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name_store', models.CharField(max_length=255, verbose_name='اسم المتجر')),
                ('address_store', models.CharField(blank=True, max_length=50, null=True, verbose_name='عنوان المتجر')),
                ('phone_store', models.PositiveIntegerField(blank=True, null=True, verbose_name='الهاتف')),
                ('site_store', models.URLField(blank=True, max_length=255, null=True, verbose_name='موقع المتجر')),
                ('logo_store', models.ImageField(blank=True, null=True, upload_to='stores/logos/', verbose_name='الشعار')),
                ('description_store', models.CharField(blank=True, max_length=255, null=True, verbose_name='نبذة عن المتجر')),
                ('publish', models.BooleanField(default=False, verbose_name='يتم نشره')),
                ('dirctors_store', models.ManyToManyField(blank=True, to=settings.AUTH_USER_MODEL, verbose_name='المدراء')),
            ],
            options={
                'verbose_name': 'متجر',
                'verbose_name_plural': 'المتاجر',
            },
        ),
        migrations.CreateModel(
            name='Book',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title_book', models.CharField(max_length=200, verbose_name='اسم الكتاب')),
                ('cover_book', models.ImageField(blank=True, null=True, upload_to='books/covers/', verbose_name='صورة ')),
                ('price', models.DecimalField(blank=True, decimal_places=0, max_digits=7, null=True, verbose_name='السعر')),
                ('pages', models.PositiveIntegerField(blank=True, null=True, verbose_name='عدد الصفحات')),
                ('values', models.PositiveIntegerField(blank=True, default=1, null=True, verbose_name='عدد الاجزاء')),
                ('year_publish', models.DateField(blank=True, null=True, verbose_name='سنة النشر')),
                ('description_book', models.TextField(blank=True, null=True, verbose_name='مختصر عن الكتاب')),
                ('available', models.BooleanField(default=True, verbose_name='متوفر')),
                ('publish', models.BooleanField(default=False, verbose_name='يتم نشره')),
                ('Categories', models.ManyToManyField(to='books.Categories', verbose_name='الفئة')),
                ('Publishers', models.ManyToManyField(to='books.Publishers', verbose_name='الناشر')),
                ('Stores', models.ManyToManyField(to='books.Stores', verbose_name='المتجر')),
                ('auther', models.ManyToManyField(to='books.Authors', verbose_name='المؤلف')),
            ],
            options={
                'verbose_name': 'كتاب',
                'verbose_name_plural': 'كتب',
            },
        ),
    ]
