1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
use matches::MatchStatus;
use opponents::Opponents;

/// A game number.
#[derive(Copy, Clone, Debug, Eq, Ord, PartialEq, PartialOrd, Serialize, Deserialize)]
pub struct GameNumber(pub i64);

/// A game description.
#[derive(Clone, Debug, Eq, Ord, PartialEq, PartialOrd, Serialize, Deserialize)]
pub struct Game {
    /// Game's number.
    pub number: GameNumber,
    /// Game's status
    pub status: MatchStatus,
    /// Game's opponents
    pub opponents: Opponents,
}

/// Array of games
#[derive(Clone, Debug, Eq, Ord, PartialEq, PartialOrd, Serialize, Deserialize)]
pub struct Games(pub Vec<Game>);