# Generated by Django 3.2.13 on 2022-05-21 11:59

import django.db.models.deletion
import django.utils.timezone
from django.conf import settings
from django.db import migrations, models

import demo_custom.models
import galleryfield.fields


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='CustomDemoGallery',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('images', galleryfield.fields.GalleryField(blank=True, null=True, target_model='demo_custom.CustomImage', verbose_name='Photos')),
                ('creator', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Creator')),
            ],
        ),
        migrations.CreateModel(
            name='CustomImage',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('photo', models.ImageField(storage=demo_custom.models.UserImageStorage(), upload_to=demo_custom.models.user_img_path, verbose_name='Photo')),
                ('added_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('gallery', models.ManyToManyField(blank=True, related_name='related_images', to='demo_custom.CustomDemoGallery', verbose_name='Gallery belongs to')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Owner')),
            ],
        ),
    ]
