mirror of
https://github.com/yogeshojha/rengine.git
synced 2026-09-13 21:37:42 +02:00
Add geo iso model
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# Generated by Django 3.2.4 on 2022-07-09 06:10
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('startScan', '0026_auto_20220526_1506'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='CountryISO',
|
||||
fields=[
|
||||
('id', models.AutoField(primary_key=True, serialize=False)),
|
||||
('name', models.CharField(blank=True, max_length=10)),
|
||||
],
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='ipaddress',
|
||||
name='geo_iso',
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='startScan.countryiso'),
|
||||
),
|
||||
]
|
||||
@@ -415,11 +415,18 @@ class Technology(models.Model):
|
||||
return str(self.name)
|
||||
|
||||
|
||||
class CountryISO(models.Model):
|
||||
id = models.AutoField(primary_key=True)
|
||||
name = models.CharField(max_length=10, blank=True)
|
||||
|
||||
|
||||
class IpAddress(models.Model):
|
||||
id = models.AutoField(primary_key=True)
|
||||
address = models.CharField(max_length=100, blank=True, null=True)
|
||||
is_cdn = models.BooleanField(default=False)
|
||||
ports = models.ManyToManyField('Port', related_name='ports')
|
||||
geo_iso = models.ForeignKey(
|
||||
CountryISO, on_delete=models.CASCADE, null=True, blank=True)
|
||||
# this is used for querying which ip was discovered during subcan
|
||||
ip_subscan_ids = models.ManyToManyField('SubScan', related_name='ip_subscan_ids')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user