# Generated by Django 4.1.3 on 2023-04-21 18:43

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
from django.contrib.staticfiles import finders

class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Announcement',
            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)),
                ('title', models.CharField(max_length=255)),
                ('body', models.TextField()),
                ('is_pinned', models.BooleanField(default=False)),
                ('date_of_expiring', models.DateTimeField(null=True)),
                ('image_url', models.FilePathField(null=True, path=finders.find("img/announcements/covers"))),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='File',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(blank=True, null=True, upload_to='announcement_files')),
                ('announcement', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='files', to='announcements.announcement')),
            ],
        ),
    ]
