45 lines
2.0 KiB
Python
45 lines
2.0 KiB
Python
# Generated by Django 5.2.7 on 2025-11-24 06:50
|
|
|
|
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='Brand',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=255)),
|
|
('website', models.URLField(blank=True)),
|
|
('logo_url', models.URLField(blank=True, verbose_name='Logo URL')),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
],
|
|
options={
|
|
'ordering': ['name'],
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='Incident',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('incident_type', models.CharField(choices=[('social_impersonation', 'Social Media Impersonation'), ('negative_review', 'Negative Review'), ('domain_squatting', 'Domain Squatting'), ('phishing_attack', 'Phishing Attack'), ('other', 'Other')], max_length=50)),
|
|
('source_url', models.URLField(max_length=500)),
|
|
('content', models.TextField(help_text='Detailed description or content of the incident (e.g., text of the post, screenshot description).')),
|
|
('status', models.CharField(choices=[('new', 'New'), ('in_review', 'In Review'), ('resolved', 'Resolved'), ('dismissed', 'Dismissed')], default='new', max_length=20)),
|
|
('reported_at', models.DateTimeField(default=django.utils.timezone.now)),
|
|
('brand', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='incidents', to='core.brand')),
|
|
],
|
|
options={
|
|
'ordering': ['-reported_at'],
|
|
},
|
|
),
|
|
]
|