//! SeaORM Entity. Generated by sea-orm-codegen 0.4.2 use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel)] #[sea_orm(table_name = "city")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub city_id: i32, pub city: String, #[sea_orm(column_type = "Custom(\"BLOB\".to_owned())")] pub country_id: String, pub last_update: DateTime, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] pub enum Relation { #[sea_orm( belongs_to = "super::country::Entity", from = "Column::CountryId", to = "super::country::Column::CountryId", on_update = "Cascade", on_delete = "NoAction" )] Country, #[sea_orm(has_many = "super::address::Entity")] Address, } impl Related for Entity { fn to() -> RelationDef { Relation::Country.def() } } impl Related for Entity { fn to() -> RelationDef { Relation::Address.def() } } impl ActiveModelBehavior for ActiveModel {}