//! SeaORM Entity. Generated by sea-orm-codegen 0.9.3 use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel)] #[sea_orm(table_name = "parent")] pub struct Model { #[sea_orm(primary_key)] pub id: i32, pub application: i32, pub name: Option, pub surname: Option, pub telephone: Option, pub email: Option, pub created_at: DateTime, pub updated_at: DateTime, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] pub enum Relation { #[sea_orm( belongs_to = "super::candidate::Entity", from = "Column::Application", to = "super::candidate::Column::Application", on_update = "Cascade", on_delete = "Cascade" )] Candidate, } impl Related for Entity { fn to() -> RelationDef { Relation::Candidate.def() } } impl ActiveModelBehavior for ActiveModel {}