knowdit-repo-model 0.2.0

Smart contract auditing framework.
Documentation
//! Edge connecting one extracted project semantic (`project_semantic`) to a
//! historical semantic (`historical_semantic`) that the Knowledge Mapper
//! decided is a fuzzy behavioural match. Each matched pair becomes one row.
use sea_orm::entity::prelude::*;

#[sea_orm::model]
#[derive(Clone, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize, DeriveEntityModel)]
#[sea_orm(table_name = "semantic_matched")]
pub struct Model {
    #[sea_orm(primary_key)]
    pub id: i32,
    /// References `project_semantic.id`.
    #[sea_orm(indexed)]
    pub extract_id: i32,
    /// References `historical_semantic.id`.
    #[sea_orm(indexed)]
    pub historical_id: i32,

    #[sea_orm(belongs_to, from = "extract_id", to = "id")]
    pub extract: Option<super::project_semantic::Entity>,
    #[sea_orm(belongs_to, from = "historical_id", to = "id")]
    pub historical: Option<super::historical_semantic::Entity>,
}

impl ActiveModelBehavior for ActiveModel {}