Skip to content

Commit 19328c8

Browse files
authored
Merge pull request #28 from buildingSMART/IVS-179-Validating-Header-Policy
IVS-179-Validating-Header-Policy
2 parents dff410e + f4f2ad4 commit 19328c8

File tree

2 files changed

+79
-0
lines changed

2 files changed

+79
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Generated by Django 5.1.3 on 2025-01-02 22:08
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
("ifc_validation_models", "0005_update_modelinstance_constraint"),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name="model",
15+
name="header_validation",
16+
field=models.JSONField(
17+
blank=True,
18+
help_text="Validation of the Header of the Model.",
19+
null=True,
20+
),
21+
),
22+
migrations.AddField(
23+
model_name="model",
24+
name="status_header",
25+
field=models.CharField(
26+
choices=[
27+
("v", "Valid"),
28+
("i", "Invalid"),
29+
("n", "Not Validated"),
30+
("w", "Warning"),
31+
("-", "Not Applicable"),
32+
],
33+
db_index=True,
34+
default="n",
35+
help_text="Status of the Header Validation.",
36+
max_length=1,
37+
),
38+
),
39+
migrations.AlterField(
40+
model_name="validationtask",
41+
name="type",
42+
field=models.CharField(
43+
choices=[
44+
("SYNTAX", "STEP Physical File Syntax"),
45+
("SCHEMA", "Schema (EXPRESS language)"),
46+
("MVD", "Model View Definitions"),
47+
("BSDD", "bSDD Compliance"),
48+
("INFO", "Parse Info"),
49+
("PREREQ", "Prerequisites"),
50+
("HEADER", "Header Validation"),
51+
("NORMATIVE_IA", "Implementer Agreements (IA)"),
52+
("NORMATIVE_IP", "Informal Propositions (IP)"),
53+
("INDUSTRY", "Industry Practices"),
54+
("INST_COMPLETION", "Instance Completion"),
55+
],
56+
db_index=True,
57+
help_text="Type of the Validation Task.",
58+
max_length=25,
59+
),
60+
),
61+
]

models.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,16 @@ class License(models.TextChoices):
551551
blank=False,
552552
help_text="Status of the Prerequisites Validation."
553553
)
554+
555+
status_header = models.CharField(
556+
max_length=1,
557+
choices=Status.choices,
558+
default=Status.NOT_VALIDATED,
559+
db_index=True,
560+
null=False,
561+
blank=False,
562+
help_text="Status of the Header Validation."
563+
)
554564

555565
uploaded_by = models.ForeignKey(
556566
to=settings.AUTH_USER_MODEL,
@@ -566,6 +576,12 @@ class License(models.TextChoices):
566576
blank=True,
567577
help_text="Properties of the Model."
568578
)
579+
580+
header_validation = models.JSONField(
581+
null=True,
582+
blank=True,
583+
help_text="Validation of the Header of the Model."
584+
)
569585

570586
class Meta:
571587
db_table = "ifc_model"
@@ -587,6 +603,7 @@ def reset_status(self):
587603
self.status_syntax = Model.Status.NOT_VALIDATED
588604
self.status_industry_practices = Model.Status.NOT_VALIDATED
589605
self.status_prereq = Model.Status.NOT_VALIDATED
606+
self.status_header = Model.Status.NOT_VALIDATED
590607
self.save()
591608

592609

@@ -822,6 +839,7 @@ class Type(models.TextChoices):
822839
BSDD = 'BSDD', 'bSDD Compliance'
823840
PARSE_INFO = 'INFO', 'Parse Info'
824841
PREREQUISITES = 'PREREQ', 'Prerequisites'
842+
HEADER = 'HEADER', 'Header Validation'
825843
NORMATIVE_IA = 'NORMATIVE_IA', 'Implementer Agreements (IA)'
826844
NORMATIVE_IP = 'NORMATIVE_IP', 'Informal Propositions (IP)'
827845
INDUSTRY_PRACTICES = 'INDUSTRY', 'Industry Practices'

0 commit comments

Comments
 (0)