aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/caf/migrations/0001_initial.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ctrack/caf/migrations/0001_initial.py66
1 files changed, 44 insertions, 22 deletions
diff --git a/ctrack/caf/migrations/0001_initial.py b/ctrack/caf/migrations/0001_initial.py
index 5e184df..ca65af6 100644
--- a/ctrack/caf/migrations/0001_initial.py
+++ b/ctrack/caf/migrations/0001_initial.py
@@ -1,6 +1,8 @@
-# Generated by Django 2.2.9 on 2020-04-03 14:07
+# Generated by Django 2.2.12 on 2020-08-27 09:40
+import ctrack.caf.models
from django.db import migrations, models
+import django.db.models.deletion
class Migration(migrations.Migration):
@@ -8,6 +10,7 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
+ ('organisations', '0001_initial'),
]
operations = [
@@ -15,49 +18,68 @@ class Migration(migrations.Migration):
name='ApplicableSystem',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=256)),
- ('description', models.TextField(max_length=1000)),
+ ('name', models.CharField(help_text='System name assigned by OES', max_length=256)),
+ ('function', models.TextField(blank=True, help_text='How the system is relevant to delivering or supporting the essential service', max_length=1000, null=True)),
+ ('dft_categorisation', models.CharField(choices=[('CR', 'Critical'), ('IM', 'Important (Legacy use only)')], default='CR', help_text='Refer to documentation for description of these criteria', max_length=2, verbose_name='DfT Categorisation')),
+ ('oes_categorisation', models.CharField(default='NA', help_text="Categorisation based on OES' own internal prioritisation process.", max_length=255, verbose_name='OES Categorisation')),
],
options={
- 'verbose_name': 'Applicable System',
+ 'verbose_name': 'NIS System',
},
),
migrations.CreateModel(
- name='CAF',
+ name='Grading',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('version', models.CharField(blank=True, max_length=10, null=True)),
- ('triage_review_date', models.DateField(blank=True, null=True)),
- ('comments', models.TextField(max_length=1000)),
+ ('descriptor', models.CharField(help_text='Q1, C1, etc', max_length=2)),
+ ('description', models.TextField(max_length=250)),
+ ('type', models.CharField(choices=[('CONFIDENCE', 'Confidence'), ('QUALITY', 'Quality'), ('MISC', 'Misc')], help_text='Type of grading', max_length=20)),
],
- options={
- 'verbose_name': 'CAF',
- },
),
migrations.CreateModel(
- name='DocumentFile',
+ name='FileStore',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=255)),
- ('type', models.IntegerField(choices=[(1, 'Excel'), (2, 'Word'), (3, 'PDF'), (4, 'Hard Copy')], default=1)),
+ ('descriptor', models.CharField(max_length=100)),
+ ('virtual_location', models.CharField(help_text='USB, Rosa, email, etc', max_length=100)),
+ ('physical_location', models.CharField(blank=True, help_text='Cupboard, room, building, etc', max_length=100)),
+ ('physical_location_organisation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organisations.Organisation')),
],
),
migrations.CreateModel(
- name='FileStore',
+ name='EssentialService',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('descriptor', models.CharField(max_length=100)),
- ('virtual_location', models.CharField(help_text='USB, Rosa, email, etc', max_length=100)),
- ('physical_location', models.CharField(blank=True, help_text='Cupboard, room, building, etc', max_length=100)),
+ ('name', models.CharField(max_length=256)),
+ ('description', models.CharField(max_length=512)),
+ ('organisation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organisations.Organisation')),
+ ('systems', models.ManyToManyField(to='caf.ApplicableSystem')),
],
),
migrations.CreateModel(
- name='Grading',
+ name='DocumentFile',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('descriptor', models.CharField(help_text='Q1, C1, etc', max_length=2)),
- ('description', models.TextField(max_length=250)),
- ('type', models.CharField(choices=[('CONFIDENCE', 'Confidence'), ('QUALITY', 'Quality'), ('MISC', 'Misc')], help_text='Type of grading', max_length=20)),
+ ('name', models.CharField(max_length=255)),
+ ('type', models.IntegerField(choices=[(1, 'Excel'), (2, 'Word'), (3, 'PDF'), (4, 'Hard Copy')], default=1)),
+ ('file_store_location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='caf.FileStore')),
],
),
+ migrations.CreateModel(
+ name='CAF',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('version', models.CharField(blank=True, max_length=10, null=True)),
+ ('triage_review_date', models.DateField(blank=True, null=True)),
+ ('comments', models.TextField(max_length=1000)),
+ ('confidence_grading', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='confidence_grading', to='caf.Grading')),
+ ('file', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='caf.DocumentFile')),
+ ('organisation', models.ForeignKey(on_delete=models.SET(ctrack.caf.models.CAF.get_sentinel_org), to='organisations.Organisation')),
+ ('quality_grading', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='quality_grading', to='caf.Grading')),
+ ('triage_review_inspector', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='organisations.Person')),
+ ],
+ options={
+ 'verbose_name': 'CAF',
+ },
+ ),
]