//! SeaORM Entity. Generated by sea-orm-codegen 0.1.0 use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel)] #[sea_orm(table_name = "rust_keyword")] pub struct Model { #[sea_orm(primary_key)] pub id: i32, pub testing: i32, pub rust: i32, pub keywords: i32, pub r#type: i32, pub r#typeof: i32, pub crate_: i32, pub self_: i32, pub self_id1: i32, pub self_id2: i32, pub fruit_id1: i32, pub fruit_id2: i32, pub cake_id: i32, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] pub enum Relation { #[sea_orm( belongs_to = "Entity", from = "Column::SelfId1", to = "Column::Id", )] SelfRef1, #[sea_orm( belongs_to = "Entity", from = "Column::SelfId2", to = "Column::Id", )] SelfRef2, #[sea_orm( belongs_to = "super::fruit::Entity", from = "Column::FruitId1", to = "super::fruit::Column::Id", )] Fruit1, #[sea_orm( belongs_to = "super::fruit::Entity", from = "Column::FruitId2", to = "super::fruit::Column::Id", )] Fruit2, #[sea_orm( belongs_to = "super::cake::Entity", from = "Column::CakeId", to = "super::cake::Column::Id", )] Cake, } impl Related for Entity { fn to() -> RelationDef { Relation::Cake.def() } } impl ActiveModelBehavior for ActiveModel {}