Skip to main content

knowdit_kg_model/db/
semantic_node_category.rs

1use sea_orm::entity::prelude::*;
2
3#[sea_orm::model]
4#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
5#[sea_orm(table_name = "semantic_node_category")]
6pub struct Model {
7    #[sea_orm(primary_key, auto_increment = false)]
8    pub semantic_node_id: i32,
9    #[sea_orm(primary_key, auto_increment = false)]
10    pub category_id: i32,
11
12    #[sea_orm(belongs_to, from = "semantic_node_id", to = "id")]
13    pub semantic_node: Option<super::semantic_node::Entity>,
14    #[sea_orm(belongs_to, from = "category_id", to = "id")]
15    pub category: Option<super::category::Entity>,
16}
17
18impl ActiveModelBehavior for ActiveModel {}