JaneDoe-ZS/nap_data/src/tables/post_girl_config_template.rs
xeon 99123a15ef newtype fun
use newtypes for template ids, pros:
1) enforces id validation
2) ease of use (helper method for getting template struct right away)
2024-07-25 01:24:48 +03:00

11 lines
247 B
Rust

use serde::Deserialize;
template_id!(PostGirlConfig u32 id);
#[derive(Deserialize, Debug)]
#[serde(rename_all = "PascalCase")]
pub struct PostGirlConfigTemplate {
#[serde(rename = "ID")]
pub id: PostGirlConfigID,
pub name: String,
}