Skip to main content

nfl_data/salaried_players/
salaried_player.rs

1use crate::scoring::Score;
2use nfl_model::{
3    DfsPosition, Game, InjuryDesignation, NflPlayerId, PlayerWeekStats, TeamAbbr, TeamWeekStats,
4};
5use std::sync::Arc;
6
7#[derive(Clone, Debug)]
8pub struct SalariedPlayer {
9    pub id: Option<NflPlayerId>,
10    pub game: Arc<Game>,
11    pub name: String,
12    pub position: DfsPosition,
13    pub team: TeamAbbr,
14    pub salary: u32,
15    pub games_played: u8,
16    pub fppg: f64,
17    /// Latest report status on the current slate, not historical game status.
18    pub injury: Option<InjuryDesignation>,
19    pub scored_stats: Option<ScoredStats>,
20}
21
22#[derive(Clone, Debug, PartialEq)]
23pub enum WeeklyStats {
24    Player(PlayerWeekStats),
25    Defense(TeamWeekStats),
26}
27
28#[derive(Clone, Debug, PartialEq)]
29pub struct ScoredStats {
30    pub stats: WeeklyStats,
31    pub score: Score,
32}