37858-vm/core/migrations/0001_initial.py
Flatlogic Bot fce8b78128 01
2026-01-27 01:50:13 +00:00

69 lines
2.8 KiB
Python

# Generated by Django 5.2.7 on 2026-01-27 01:49
import django.db.models.deletion
from django.db import migrations, models
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')),
('title', models.CharField(max_length=255)),
('content', models.TextField()),
('type', models.CharField(choices=[('announcement', 'Announcement'), ('news', 'News')], default='announcement', max_length=20)),
('image_url', models.URLField(blank=True, null=True)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
],
options={
'ordering': ['-created_at'],
},
),
migrations.CreateModel(
name='Event',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=255)),
('description', models.TextField()),
('start_date', models.DateTimeField()),
('end_date', models.DateTimeField(blank=True, null=True)),
('location', models.CharField(blank=True, max_length=255, null=True)),
('created_at', models.DateTimeField(auto_now_add=True)),
],
options={
'ordering': ['start_date'],
},
),
migrations.CreateModel(
name='Resource',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=100)),
('description', models.CharField(blank=True, max_length=255, null=True)),
('url', models.URLField()),
('icon_class', models.CharField(default='bi-link-45deg', help_text='Bootstrap Icon class', max_length=50)),
],
),
migrations.CreateModel(
name='Comment',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('author_name', models.CharField(max_length=100)),
('content', models.TextField()),
('created_at', models.DateTimeField(auto_now_add=True)),
('announcement', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='core.announcement')),
],
options={
'ordering': ['created_at'],
},
),
]