mirror of
https://github.com/Xevion/banner.git
synced 2026-01-31 14:23:36 -06:00
23 lines
563 B
Rust
23 lines
563 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
/// Represents a key-value pair from the Banner API
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct Pair {
|
|
pub code: String,
|
|
pub description: String,
|
|
}
|
|
|
|
/// Represents a term in the Banner system
|
|
pub type BannerTerm = Pair;
|
|
|
|
/// Represents an instructor in the Banner system
|
|
#[allow(dead_code)]
|
|
pub type Instructor = Pair;
|
|
|
|
impl BannerTerm {
|
|
/// Returns true if the term is in an archival (view-only) state
|
|
pub fn is_archived(&self) -> bool {
|
|
self.description.contains("View Only")
|
|
}
|
|
}
|