//! `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 = "virtual_hosts")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: Uuid, pub workspace_id: Uuid, pub name: String, pub server_name: String, pub listen_port: i32, pub ssl_enabled: bool, pub ssl_certificate_id: Option, pub locations: Option, pub http2_enabled: bool, pub http3_enabled: bool, pub gzip_enabled: bool, pub target_agents: Option, pub created_at: DateTimeWithTimeZone, pub updated_at: DateTimeWithTimeZone, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] pub enum Relation { #[sea_orm( belongs_to = "super::workspaces::Entity", from = "Column::WorkspaceId", to = "super::workspaces::Column::Id", on_update = "NoAction", on_delete = "Cascade" )] Workspaces, } impl Related for Entity { fn to() -> RelationDef { Relation::Workspaces.def() } } impl ActiveModelBehavior for ActiveModel {}