use heldar_kernel::env::parse_or;
#[derive(Clone, Debug)]
pub struct EntryConfig {
pub anpr_min_votes: u32,
pub entry_retention_days: i64,
}
impl EntryConfig {
pub fn from_env() -> Self {
EntryConfig {
anpr_min_votes: parse_or::<u32>("HELDAR_ANPR_MIN_VOTES", 3).clamp(1, 50),
entry_retention_days: parse_or("HELDAR_ENTRY_RETENTION_DAYS", 365),
}
}
}