25 lines
597 B
Rust
25 lines
597 B
Rust
|
use sea_orm::entity::prelude::*;
|
||
|
use serde::{Deserialize, Serialize};
|
||
|
|
||
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize, Deserialize)]
|
||
|
#[sea_orm(table_name = "setting")]
|
||
|
#[serde(rename_all = "camelCase")]
|
||
|
pub struct Model {
|
||
|
#[sea_orm(primary_key)]
|
||
|
#[serde(skip_deserializing)]
|
||
|
pub id: i32,
|
||
|
pub setting_name: String,
|
||
|
pub setting_value: String,
|
||
|
}
|
||
|
|
||
|
#[derive(Copy, Clone, Debug, EnumIter)]
|
||
|
pub enum Relation {}
|
||
|
|
||
|
impl RelationTrait for Relation {
|
||
|
fn def(&self) -> RelationDef {
|
||
|
panic!("No RelationDef")
|
||
|
}
|
||
|
}
|
||
|
|
||
|
impl ActiveModelBehavior for ActiveModel {}
|