//! SeaORM Entity. Generated by sea-orm-codegen 0.1.0 use sea_orm::entity::prelude:: * ; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] #[sea_orm(table_name = "cake")] pub struct Model { #[sea_orm(primary_key)] #[serde(skip_deserializing)] pub id: i32, #[sea_orm(column_type = "Text", nullable)] pub name: Option , } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] pub enum Relation { #[sea_orm(has_many = "super::fruit::Entity")] Fruit, } impl Related for Entity { fn to() -> RelationDef { Relation::Fruit.def() } } impl Related for Entity { fn to() -> RelationDef { super::cake_filling::Relation::Filling.def() } fn via() -> Option { Some(super::cake_filling::Relation::Cake.def().rev()) } } impl ActiveModelBehavior for ActiveModel {}