# Generated by Django 4.2.0 on 2026-02-05 10:39

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='About',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200, verbose_name='标题')),
                ('content', models.TextField(verbose_name='内容')),
                ('image', models.ImageField(blank=True, null=True, upload_to='about/', verbose_name='图片')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
            ],
            options={
                'verbose_name': '关于页面',
                'verbose_name_plural': '关于页面',
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='分类名称')),
                ('slug', models.SlugField(blank=True, max_length=100, unique=True, verbose_name='URL标识')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
            ],
            options={
                'verbose_name': '作品分类',
                'verbose_name_plural': '作品分类',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Artwork',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200, verbose_name='作品标题')),
                ('description', models.TextField(blank=True, verbose_name='作品描述')),
                ('slug', models.SlugField(blank=True, max_length=200, unique=True, verbose_name='URL标识')),
                ('image', models.ImageField(upload_to='artworks/%Y/%m/%d/', verbose_name='作品图片')),
                ('thumbnail', models.ImageField(blank=True, null=True, upload_to='thumbnails/%Y/%m/%d/', verbose_name='缩略图')),
                ('order', models.IntegerField(default=0, help_text='数字越小越靠前', verbose_name='排序序号')),
                ('grid_size', models.CharField(choices=[('small', '小 (1x1)'), ('medium', '中 (2x2)'), ('large', '大 (3x3)')], default='medium', help_text='控制首页展示的大小', max_length=10, verbose_name='网格尺寸')),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now, verbose_name='创建时间')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('view_count', models.PositiveIntegerField(default=0, verbose_name='浏览次数')),
                ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='gallery.category', verbose_name='作品分类')),
            ],
            options={
                'verbose_name': '摄影作品',
                'verbose_name_plural': '摄影作品',
                'ordering': ['order', '-created_at'],
            },
        ),
    ]