//! `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 = "upstream_target")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: Uuid, pub upstream_id: Uuid, pub target_host: String, pub target_port: i64, pub weight: i64, pub is_backup: bool, pub enabled: bool, pub created_at: DateTimeUtc, pub updated_at: DateTimeUtc, #[sea_orm( belongs_to, from = "upstream_id", to = "id", on_update = "Cascade", on_delete = "Cascade" )] pub upstream: HasOne, } impl ActiveModelBehavior for ActiveModel {}