-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add strategic scenario model (#1206)
- Loading branch information
Showing
27 changed files
with
643 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 97 additions & 0 deletions
97
...end/ebios_rm/migrations/0008_remove_attackpath_ro_to_couple_strategicscenario_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# Generated by Django 5.1.4 on 2024-12-20 08:56 | ||
|
||
import django.db.models.deletion | ||
import iam.models | ||
import uuid | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("ebios_rm", "0007_ebiosrmstudy_meta"), | ||
("iam", "0010_user_preferences"), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name="attackpath", | ||
name="ro_to_couple", | ||
), | ||
migrations.CreateModel( | ||
name="StrategicScenario", | ||
fields=[ | ||
( | ||
"id", | ||
models.UUIDField( | ||
default=uuid.uuid4, | ||
editable=False, | ||
primary_key=True, | ||
serialize=False, | ||
), | ||
), | ||
( | ||
"created_at", | ||
models.DateTimeField(auto_now_add=True, verbose_name="Created at"), | ||
), | ||
( | ||
"updated_at", | ||
models.DateTimeField(auto_now=True, verbose_name="Updated at"), | ||
), | ||
( | ||
"is_published", | ||
models.BooleanField(default=False, verbose_name="published"), | ||
), | ||
("name", models.CharField(max_length=200, verbose_name="Name")), | ||
( | ||
"description", | ||
models.TextField(blank=True, null=True, verbose_name="Description"), | ||
), | ||
("ref_id", models.CharField(blank=True, max_length=100)), | ||
( | ||
"ebios_rm_study", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="strategic_scenarios", | ||
to="ebios_rm.ebiosrmstudy", | ||
verbose_name="EBIOS RM study", | ||
), | ||
), | ||
( | ||
"folder", | ||
models.ForeignKey( | ||
default=iam.models.Folder.get_root_folder_id, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="%(class)s_folder", | ||
to="iam.folder", | ||
), | ||
), | ||
( | ||
"ro_to_couple", | ||
models.ForeignKey( | ||
help_text="RO/TO couple from which the attach path is derived", | ||
on_delete=django.db.models.deletion.CASCADE, | ||
to="ebios_rm.roto", | ||
verbose_name="RO/TO couple", | ||
), | ||
), | ||
], | ||
options={ | ||
"verbose_name": "Strategic Scenario", | ||
"verbose_name_plural": "Strategic Scenarios", | ||
"ordering": ["created_at"], | ||
}, | ||
), | ||
migrations.AddField( | ||
model_name="attackpath", | ||
name="strategic_scenario", | ||
field=models.ForeignKey( | ||
default="", | ||
help_text="Strategic scenario from which the attack path is derived", | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="attack_paths", | ||
to="ebios_rm.strategicscenario", | ||
verbose_name="Strategic scenario", | ||
), | ||
preserve_default=False, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.