Skip to content

Commit

Permalink
Update data-model
Browse files Browse the repository at this point in the history
  • Loading branch information
monsieurswag committed May 15, 2024
1 parent 5ae1662 commit f3e56f5
Showing 1 changed file with 30 additions and 14 deletions.
44 changes: 30 additions & 14 deletions documentation/architecture/data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ erDiagram
DOMAIN ||--o{ COMPLIANCE_ASSESSMENT_REVIEW: contains
ROOT_FOLDER ||--o{ FRAMEWORK : contains
ROOT_FOLDER ||--o{ REFERENCE_CONTROL : contains
ROOT_FOLDER ||--o{ LIBRARY : contains
ROOT_FOLDER ||--o{ STORED_LIBRARY : contains
ROOT_FOLDER ||--o{ LOADED_LIBRARY : contains
ROOT_FOLDER ||--o{ USER : contains
ROOT_FOLDER ||--o{ USER_GROUP : contains
ROOT_FOLDER ||--o{ ROLE : contains
Expand All @@ -58,12 +59,12 @@ erDiagram
```mermaid
erDiagram
LIBRARY |o--o{ REFERENCE_CONTROL: contains
LIBRARY |o--o{ THREAT : contains
LIBRARY ||--o{ FRAMEWORK : contains
LIBRARY ||--o{ RISK_MATRIX : contains
LIBRARY ||--o{ MAPPING : contains
LIBRARY2 }o--o{ LIBRARY : depends_on
LOADED_LIBRARY |o--o{ REFERENCE_CONTROL: contains
LOADED_LIBRARY |o--o{ THREAT : contains
LOADED_LIBRARY ||--o{ FRAMEWORK : contains
LOADED_LIBRARY ||--o{ RISK_MATRIX : contains
LOADED_LIBRARY ||--o{ MAPPING : contains
LOADED_LIBRARY2 }o--o{ LOADED_LIBRARY : depends_on
```

### General data model
Expand Down Expand Up @@ -419,13 +420,15 @@ NameDescriptionMixin <|-- RiskScenario
AbstractBaseModel <|-- NameDescriptionMixin
NameDescriptionMixin <|-- ReferentialObjectMixin
FolderMixin <|-- ReferentialObjectMixin
ReferentialObjectMixin <|-- Library
ReferentialObjectMixin <|-- Threat
ReferentialObjectMixin <|-- ReferenceControl
ReferentialObjectMixin <|-- RiskMatrix
ReferentialObjectMixin <|-- Framework
ReferentialObjectMixin <|-- RequirementNode
ReferentialObjectMixin <|-- Mapping
ReferentialObjectMixin <|-- LibraryMixin
LibraryMixin <|-- StoredLibrary
LibraryMixin <|-- LoadedLibrary
NameDescriptionMixin <|-- Assessment
FolderMixin <|-- Project
NameDescriptionMixin <|-- Project
Expand Down Expand Up @@ -455,31 +458,44 @@ namespace ReferentialObjects {
+display_long() str
}
class Library {
class LibraryMixin {
+CharField copyright
+IntegerField version
+CharField provider
+CharField packager
+Library[] dependencies
+JsonField dependencies
+BooleanField builtin
+JSONField objects_meta
}
class StoredLibrary {
+BooleanField is_obsolete
+BooleanField is_loaded
+CharField hash_checksum
+TextField content
}
class LoadedLibrary {
+LoadedLibrary[] dependencies
+reference_count() int
}
class Threat {
+Library library
+LoadedLibrary library
+is_deletable() bool
+frameworks() Framework[]
}
class ReferenceControl {
+Library library
+LoadedLibrary library
+CharField category
+JSONField typical_evidence
+is_deletable() bool
+frameworks() Framework[]
}
class RiskMatrix {
+Library library
+LoadedLibrary library
+JSONField json_definition
+BooleanField is_enabled
+CharField provider
Expand All @@ -492,7 +508,7 @@ namespace ReferentialObjects {
}
class Framework {
+Library library
+LoadedLibrary library
+int get_next_order_id(obj_type, _parent_urn)
+is_deletable() bool
}
Expand Down

0 comments on commit f3e56f5

Please sign in to comment.