phonograph/phono-server/src/field_info.rs

22 lines
566 B
Rust
Raw Normal View History

2025-10-01 22:36:19 -07:00
use std::collections::HashMap;
use phono_models::{field::Field, language::Language};
2025-08-13 18:52:37 -07:00
use serde::Serialize;
#[derive(Clone, Debug, Serialize)]
2025-10-01 22:36:19 -07:00
pub(crate) struct TableFieldInfo {
pub(crate) field: Field,
pub(crate) column_present: bool,
pub(crate) has_default: bool,
pub(crate) not_null: bool,
}
#[derive(Clone, Debug, Serialize)]
pub(crate) struct FormFieldInfo {
pub(crate) field: Field,
pub(crate) column_present: bool,
pub(crate) has_default: bool,
pub(crate) not_null: bool,
pub(crate) prompts: HashMap<Language, String>,
2025-08-13 18:52:37 -07:00
}