29 lines
790 B
Rust
29 lines
790 B
Rust
//! SeaORM Entity. Generated by sea-orm-codegen 0.9.2
|
|
|
|
use sea_orm::entity::prelude::*;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)]
|
|
#[sea_orm(table_name = "instance_info")]
|
|
pub struct Model {
|
|
#[sea_orm(primary_key, auto_increment = false)]
|
|
pub id: u32,
|
|
pub hostname: String,
|
|
pub mac_address: String,
|
|
#[serde(skip_serializing_if = "Option::is_none")]
|
|
pub ssh_keys: Option<String>,
|
|
#[serde(skip_serializing_if = "Option::is_none")]
|
|
pub user_data: Option<Vec<u8>>,
|
|
}
|
|
|
|
#[derive(Copy, Clone, Debug, EnumIter)]
|
|
pub enum Relation {}
|
|
|
|
impl RelationTrait for Relation {
|
|
fn def(&self) -> RelationDef {
|
|
panic!("No RelationDef")
|
|
}
|
|
}
|
|
|
|
impl ActiveModelBehavior for ActiveModel {}
|