//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0.0-rc.18 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; #[sea_orm::model] #[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "proxy_host")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: Uuid, pub name: Option, pub domain: String, pub scheme: String, pub listen_port: i64, pub forward_scheme: String, pub forward_host: Option, pub forward_port: Option, pub preserve_host_header: bool, pub enable_websocket: bool, pub enabled: bool, #[sea_orm(column_type = "JsonBinary", nullable)] pub meta: Option, pub default_upstream_id: Option, pub created_by: Option, pub created_at: DateTimeUtc, pub updated_at: DateTimeUtc, #[sea_orm(has_many)] pub locations: HasMany, #[sea_orm( belongs_to, from = "default_upstream_id", to = "id", on_update = "Cascade", on_delete = "SetNull" )] pub upstream: HasOne, #[sea_orm( belongs_to, from = "created_by", to = "id", on_update = "Cascade", on_delete = "SetNull" )] pub user: HasOne, } impl ActiveModelBehavior for ActiveModel {}