Skip to main content

fanduel_data/models/
salaried_player.rs

1use crate::models::game::Game;
2use crate::models::player::Player;
3use nfl_model::{DfsPosition, TeamAbbr};
4
5/// A player's or defense's FanDuel salary entry for a game.
6///
7/// `player` is `None` for defense/special teams (`DST`) entries and `Some` for all other
8/// positions.
9#[derive(Debug, Clone, PartialEq)]
10pub struct SalariedPlayer {
11    /// Player associated with the entry, or `None` for `DST`.
12    pub player: Option<Player>,
13    /// Game and season week associated with the entry.
14    pub game: Game,
15    /// Salary in FanDuel's export units (typically whole dollars).
16    pub salary: u32,
17    /// FanDuel DFS roster position; see [`DfsPosition`] for supported positions.
18    pub position: DfsPosition,
19    /// Team represented by this entry, as a [`TeamAbbr`].
20    pub team: TeamAbbr,
21}