update
This commit is contained in:
80
osint/migrations/0001_initial.py
Normal file
80
osint/migrations/0001_initial.py
Normal file
@@ -0,0 +1,80 @@
|
||||
# Generated by Django 5.2.8 on 2025-11-26 13:41
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('reports', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='OSINTConfiguration',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('service_name', models.CharField(max_length=100, unique=True)),
|
||||
('api_key', models.CharField(blank=True, help_text='Encrypted API key', max_length=255)),
|
||||
('api_url', models.URLField(blank=True)),
|
||||
('is_active', models.BooleanField(default=True)),
|
||||
('rate_limit', models.IntegerField(default=100, help_text='Requests per hour')),
|
||||
('configuration', models.JSONField(blank=True, default=dict, help_text='Additional configuration')),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('updated_at', models.DateTimeField(auto_now=True)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'OSINT Configuration',
|
||||
'verbose_name_plural': 'OSINT Configurations',
|
||||
'db_table': 'osint_osintconfiguration',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='OSINTResult',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('source', models.CharField(help_text='OSINT source/service name', max_length=100)),
|
||||
('data_type', models.CharField(choices=[('whois', 'WHOIS Data'), ('dns', 'DNS Records'), ('ssl', 'SSL Certificate'), ('archive', 'Archive Data'), ('email', 'Email Data'), ('phone', 'Phone Data'), ('business', 'Business Registry Data'), ('social', 'Social Media Data'), ('reputation', 'Reputation Data')], max_length=50)),
|
||||
('raw_data', models.JSONField(default=dict, help_text='Raw data from OSINT source')),
|
||||
('processed_data', models.JSONField(blank=True, default=dict, help_text='Processed/cleaned data')),
|
||||
('confidence_level', models.IntegerField(default=0, help_text='Confidence level (0-100)')),
|
||||
('is_verified', models.BooleanField(default=False, help_text='Manually verified by moderator')),
|
||||
('collected_at', models.DateTimeField(auto_now_add=True)),
|
||||
('updated_at', models.DateTimeField(auto_now=True)),
|
||||
('report', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='osint_results', to='reports.scamreport')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'OSINT Result',
|
||||
'verbose_name_plural': 'OSINT Results',
|
||||
'db_table': 'osint_osintresult',
|
||||
'ordering': ['-collected_at'],
|
||||
'indexes': [models.Index(fields=['report', 'data_type'], name='osint_osint_report__4a95b0_idx'), models.Index(fields=['confidence_level', 'is_verified'], name='osint_osint_confide_47552d_idx')],
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='OSINTTask',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('task_type', models.CharField(choices=[('domain_analysis', 'Domain Analysis'), ('url_analysis', 'URL Analysis'), ('email_analysis', 'Email Analysis'), ('phone_analysis', 'Phone Analysis'), ('whois_lookup', 'WHOIS Lookup'), ('dns_lookup', 'DNS Lookup'), ('ssl_check', 'SSL Certificate Check'), ('archive_check', 'Archive Check'), ('business_registry', 'Business Registry Check'), ('social_media', 'Social Media Check')], max_length=50)),
|
||||
('status', models.CharField(choices=[('pending', 'Pending'), ('running', 'Running'), ('completed', 'Completed'), ('failed', 'Failed'), ('cancelled', 'Cancelled')], default='pending', max_length=20)),
|
||||
('parameters', models.JSONField(default=dict, help_text='Task parameters (e.g., URL, email, phone)')),
|
||||
('result', models.JSONField(blank=True, default=dict, help_text='Task result data')),
|
||||
('error_message', models.TextField(blank=True)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('started_at', models.DateTimeField(blank=True, null=True)),
|
||||
('completed_at', models.DateTimeField(blank=True, null=True)),
|
||||
('retry_count', models.IntegerField(default=0)),
|
||||
('report', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='osint_tasks', to='reports.scamreport')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'OSINT Task',
|
||||
'verbose_name_plural': 'OSINT Tasks',
|
||||
'db_table': 'osint_osinttask',
|
||||
'ordering': ['-created_at'],
|
||||
'indexes': [models.Index(fields=['status', 'created_at'], name='osint_osint_status_290802_idx'), models.Index(fields=['report', 'task_type'], name='osint_osint_report__e7bd16_idx')],
|
||||
},
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user