initial commit
This commit is contained in:
78
apps/communications/migrations/0001_initial.py
Normal file
78
apps/communications/migrations/0001_initial.py
Normal file
@@ -0,0 +1,78 @@
|
||||
# Generated by Django 5.2.5 on 2025-10-16 12:07
|
||||
|
||||
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')),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('updated_at', models.DateTimeField(auto_now=True)),
|
||||
('is_deleted', models.BooleanField(default=False)),
|
||||
('deleted_at', models.DateTimeField(blank=True, null=True)),
|
||||
('title', models.CharField(max_length=200, verbose_name='Title')),
|
||||
('content', models.TextField(verbose_name='Content')),
|
||||
('announcement_type', models.CharField(choices=[('general', 'General'), ('event', 'Event'), ('academic', 'Academic'), ('urgent', 'Urgent'), ('newsletter', 'Newsletter')], default='general', max_length=20, verbose_name='Type')),
|
||||
('priority', models.CharField(choices=[('low', 'Low'), ('normal', 'Normal'), ('high', 'High'), ('urgent', 'Urgent')], default='normal', max_length=10, verbose_name='Priority')),
|
||||
('is_published', models.BooleanField(default=False, verbose_name='Published')),
|
||||
('publish_date', models.DateTimeField(blank=True, null=True, verbose_name='Publish Date')),
|
||||
('send_email', models.BooleanField(default=False, verbose_name='Send Email Notification')),
|
||||
('send_push', models.BooleanField(default=False, verbose_name='Send Push Notification')),
|
||||
('email_sent', models.BooleanField(default=False, verbose_name='Email Sent')),
|
||||
('push_sent', models.BooleanField(default=False, verbose_name='Push Sent')),
|
||||
('target_audience', models.CharField(choices=[('all', 'All Users'), ('members', 'Members Only'), ('committee', 'Committee Only'), ('subscribers', 'Newsletter Subscribers Only')], default='all', max_length=20, verbose_name='Target Audience')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Announcement',
|
||||
'verbose_name_plural': 'Announcements',
|
||||
'ordering': ['-created_at'],
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='NewsletterSubscription',
|
||||
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)),
|
||||
('is_deleted', models.BooleanField(default=False)),
|
||||
('deleted_at', models.DateTimeField(blank=True, null=True)),
|
||||
('email', models.EmailField(max_length=254, unique=True, verbose_name='Email')),
|
||||
('is_active', models.BooleanField(default=True, verbose_name='Active')),
|
||||
('subscribed_categories', models.JSONField(blank=True, default=list, help_text='List of announcement types to receive', verbose_name='Subscribed Categories')),
|
||||
('confirmation_token', models.CharField(blank=True, max_length=100, verbose_name='Confirmation Token')),
|
||||
('confirmed_at', models.DateTimeField(blank=True, null=True, verbose_name='Confirmed At')),
|
||||
('unsubscribe_token', models.CharField(blank=True, max_length=100, verbose_name='Unsubscribe Token')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Newsletter Subscription',
|
||||
'verbose_name_plural': 'Newsletter Subscriptions',
|
||||
'ordering': ['-created_at'],
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PushNotificationDevice',
|
||||
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)),
|
||||
('is_deleted', models.BooleanField(default=False)),
|
||||
('deleted_at', models.DateTimeField(blank=True, null=True)),
|
||||
('device_token', models.TextField(verbose_name='Device Token')),
|
||||
('device_type', models.CharField(choices=[('web', 'Web'), ('android', 'Android'), ('ios', 'iOS')], max_length=10, verbose_name='Device Type')),
|
||||
('is_active', models.BooleanField(default=True, verbose_name='Active')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Push Notification Device',
|
||||
'verbose_name_plural': 'Push Notification Devices',
|
||||
},
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user