Skip to content

Commit ba0af8f

Browse files
committed
chore: fix up external node entity
1 parent 0daafff commit ba0af8f

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

entity/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ pub mod purl_status;
2222
pub mod qualified_purl;
2323
pub mod relationship;
2424
pub mod sbom;
25+
pub mod sbom_external_node;
2526
pub mod sbom_file;
2627
pub mod sbom_node;
2728
pub mod sbom_package;

entity/src/sbom_external_node.rs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,30 @@ pub struct Model {
1212
pub external_node_ref: String,
1313
pub external_type: ExternalType,
1414
pub target_sbom_id: Option<Uuid>,
15-
1615
}
1716

18-
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
17+
#[derive(
18+
Debug,
19+
Clone,
20+
Copy,
21+
PartialEq,
22+
Eq,
23+
EnumIter,
24+
DeriveActiveEnum,
25+
serde::Serialize,
26+
serde::Deserialize,
27+
DeepSizeOf,
28+
)]
1929
#[sea_orm(rs_type = "i32", db_type = "Integer")]
2030
#[serde(rename_all = "snake_case")]
21-
#[derive(DeepSizeOf)]
31+
2232
pub enum ExternalType {
2333
#[sea_orm(num_value = 0)]
2434
SPDX,
2535
#[sea_orm(num_value = 1)]
26-
CDX,
36+
CycloneDx,
2737
#[sea_orm(num_value = 2)]
28-
RH_PRODUCT_COMPONENT,
38+
RedHatProductComponent,
2939
}
3040

3141
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]

0 commit comments

Comments
 (0)