//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "log_setting")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: Uuid, pub server_id: Uuid, pub access_log_path: Option, pub error_log_path: Option, pub log_level: Option, pub override_of_id: Option, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] pub enum Relation { #[sea_orm( belongs_to = "Entity", from = "Column::OverrideOfId", to = "Column::Id", on_update = "Cascade", on_delete = "SetNull" )] SelfRef, #[sea_orm( belongs_to = "super::server_block::Entity", from = "Column::ServerId", to = "super::server_block::Column::Id", on_update = "NoAction", on_delete = "Cascade" )] ServerBlock, } impl Related for Entity { fn to() -> RelationDef { Relation::ServerBlock.def() } } impl ActiveModelBehavior for ActiveModel {}