# Generated by Django 5.1.7 on 2025-11-16 03:04

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        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, unique=True)),
                ('slug', models.SlugField(blank=True, max_length=100, unique=True)),
                ('description', models.TextField(blank=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name_plural': 'Categories',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='News',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(help_text='Title for SEO', max_length=255)),
                ('slug', models.SlugField(blank=True, max_length=255, unique=True)),
                ('short_description', models.CharField(help_text='Short description for SEO (meta description)', max_length=500)),
                ('description', models.TextField(help_text='Full content/description')),
                ('publish_date', models.DateTimeField(default=django.utils.timezone.now, help_text='Date and time when the news/event is published')),
                ('featured_image', models.ImageField(blank=True, help_text='Main featured image for the news/event', null=True, upload_to='news/featured/')),
                ('is_active', models.BooleanField(default=True, help_text='Whether the news is active/published')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('category', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='news_items', to='news.category')),
            ],
            options={
                'verbose_name_plural': 'News',
                'ordering': ['-publish_date', '-created_at'],
            },
        ),
        migrations.CreateModel(
            name='ImageGallery',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(help_text='Gallery image', upload_to='news/gallery/')),
                ('caption', models.CharField(blank=True, help_text='Optional caption for the image', max_length=255, null=True)),
                ('order', models.PositiveIntegerField(default=0, help_text='Order of image display')),
                ('uploaded_at', models.DateTimeField(auto_now_add=True)),
                ('news', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='gallery_images', to='news.news')),
            ],
            options={
                'verbose_name_plural': 'Image Galleries',
                'ordering': ['order', 'uploaded_at'],
            },
        ),
    ]
