Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update data-model for future library management refactoring #264

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading