#![doc = include_str!("../../docs/game/matchup.md")]
#[cfg(feature = "rocket_okapi")]
use rocket_okapi::okapi::schemars;
#[cfg(feature = "rocket_okapi")]
use rocket_okapi::okapi::schemars::JsonSchema;
use serde::{Serialize, Deserialize};
use crate::team::FootballTeam;
pub enum FootballMatchupResult {
Win,
Loss,
Tie,
}
#[cfg_attr(feature = "rocket_okapi", derive(JsonSchema))]
#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Default, Deserialize, Serialize)]
pub struct FootballMatchup {
home: FootballTeam,
away: FootballTeam
}
impl FootballMatchup {
pub fn home_team(&self) -> &FootballTeam {
&self.home
}
pub fn away_team(&self) -> &FootballTeam {
&self.away
}
}