Skip to content

Commit

Permalink
Update data-model for future library management refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
monsieurswag committed Apr 15, 2024
1 parent bbb2507 commit fe42939
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions documentation/architecture/data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ erDiagram
ROOT_FOLDER ||--o{ FRAMEWORK : contains
ROOT_FOLDER ||--o{ REFERENCE_CONTROL : contains
ROOT_FOLDER ||--o{ LIBRARY : contains
ROOT_FOLDER ||--o{ IMPORTED_LIBRARY : contains
ROOT_FOLDER ||--o{ USER : contains
ROOT_FOLDER ||--o{ USER_GROUP : contains
ROOT_FOLDER ||--o{ ROLE : contains
Expand Down Expand Up @@ -427,7 +428,9 @@ NameDescriptionMixin <|-- RiskScenario
AbstractBaseModel <|-- NameDescriptionMixin
NameDescriptionMixin <|-- ReferentialObjectMixin
FolderMixin <|-- ReferentialObjectMixin
ReferentialObjectMixin <|-- Library
ReferentialObjectMixin <|-- LibraryMixin
LibraryMixin <|-- Library
LibraryMixin <|-- ImportedLibrary
ReferentialObjectMixin <|-- Threat
ReferentialObjectMixin <|-- ReferenceControl
ReferentialObjectMixin <|-- RiskMatrix
Expand Down Expand Up @@ -464,31 +467,39 @@ namespace ReferentialObjects {
+display_long() str
}
class Library {
class LibraryMixin {
+CharField copyright
+IntegerField version
+CharField provider
+CharField packager
+Library[] dependencies
}
class Library {
+CharField hash_checksum
+BinaryField content
}
class ImportedLibrary {
+reference_count() int
}
class Threat {
+Library library
+ImportedLibrary library
+is_deletable() bool
+frameworks() Framework[]
}
class ReferenceControl {
+Library library
+ImportedLibrary library
+CharField category
+JSONField typical_evidence
+is_deletable() bool
+frameworks() Framework[]
}
class RiskMatrix {
+Library library
+ImportedLibrary library
+JSONField json_definition
+BooleanField is_enabled
+CharField provider
Expand All @@ -501,7 +512,7 @@ namespace ReferentialObjects {
}
class Framework {
+Library library
+ImportedLibrary library
+int get_next_order_id(obj_type, _parent_urn)
+is_deletable() bool
}
Expand Down

0 comments on commit fe42939

Please sign in to comment.