//! SeaORM Entity. Generated by sea-orm-codegen 0.9.3 use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel)] #[sea_orm(table_name = "candidate")] pub struct Model { #[sea_orm(primary_key)] pub id: i32, pub name: Option, pub surname: Option, pub birth_surname: Option, pub birthplace: Option, pub birthdate: Option, pub address: Option, pub telephone: Option, pub citizenship: Option, pub email: Option, pub sex: Option, pub personal_identification_number: String, pub school_name: Option, pub health_insurance: Option, pub encrypted_by_id: Option, pub created_at: DateTime, pub updated_at: DateTime, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] pub enum Relation { #[sea_orm(has_many = "super::application::Entity")] Application, #[sea_orm(has_many = "super::parent::Entity")] Parent, } impl Related for Entity { fn to() -> RelationDef { Relation::Application.def() } } impl Related for Entity { fn to() -> RelationDef { Relation::Parent.def() } } impl ActiveModelBehavior for ActiveModel {}