15 lines
391 B
Rust
15 lines
391 B
Rust
// src/utils/columns.rs
|
|
pub fn is_system_column(column_name: &str) -> bool {
|
|
match column_name {
|
|
"id" | "deleted" | "created_at" => true,
|
|
name if name.ends_with("_id") => true,
|
|
_ => false,
|
|
}
|
|
}
|
|
|
|
pub fn filter_user_columns(all_columns: Vec<String>) -> Vec<String> {
|
|
all_columns.into_iter()
|
|
.filter(|col| !is_system_column(col))
|
|
.collect()
|
|
}
|