Files
NxMesh/apps/nxmesh-master/src/db/entities/ssl_certificate.rs
GW_MC 2dbab85c87 feat: add new database entities and migration for proxy configuration
- Introduced `log_setting`, `proxy_config`, `proxy_setting`, `rewrite_rule`, `server_block`, `ssl_certificate`, and `upstream` entities with their respective fields and relationships.
- Updated `mod.rs` and `prelude.rs` to include new entities.
- Created migration script to set up new tables and relationships in the database.
- Altered existing `agents` table to include a foreign key reference to `agent_group`.
2026-06-21 11:06:20 +00:00

30 lines
776 B
Rust

//! `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 = "ssl_certificate")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: Uuid,
pub name: String,
pub cert_path: String,
pub key_path: String,
pub expiry_date: DateTime,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {
#[sea_orm(has_many = "super::server_block::Entity")]
ServerBlock,
}
impl Related<super::server_block::Entity> for Entity {
fn to() -> RelationDef {
Relation::ServerBlock.def()
}
}
impl ActiveModelBehavior for ActiveModel {}