update
This commit is contained in:
39
gnx-react/backend/support/migrations/0003_registeredemail.py
Normal file
39
gnx-react/backend/support/migrations/0003_registeredemail.py
Normal file
@@ -0,0 +1,39 @@
|
||||
# Generated by Django 4.2.7 on 2025-10-07 18:58
|
||||
|
||||
from django.conf import settings
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
('support', '0002_knowledgebasecategory_knowledgebasearticle'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='RegisteredEmail',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('email', models.EmailField(max_length=254, unique=True, validators=[django.core.validators.EmailValidator()])),
|
||||
('company_name', models.CharField(blank=True, help_text='Company or organization name', max_length=200)),
|
||||
('contact_name', models.CharField(blank=True, help_text='Primary contact name', max_length=200)),
|
||||
('notes', models.TextField(blank=True, help_text='Internal notes about this registration')),
|
||||
('is_active', models.BooleanField(default=True, help_text='Whether this email can submit tickets')),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('updated_at', models.DateTimeField(auto_now=True)),
|
||||
('last_ticket_date', models.DateTimeField(blank=True, help_text='Last time this email submitted a ticket', null=True)),
|
||||
('ticket_count', models.PositiveIntegerField(default=0, help_text='Total number of tickets submitted')),
|
||||
('added_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='registered_emails', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Registered Email',
|
||||
'verbose_name_plural': 'Registered Emails',
|
||||
'ordering': ['-created_at'],
|
||||
'indexes': [models.Index(fields=['email'], name='support_reg_email_ee78ad_idx'), models.Index(fields=['is_active'], name='support_reg_is_acti_fadc86_idx')],
|
||||
},
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user