1
|
|
|
<?php |
2
|
|
|
namespace PhpDraft\Domain\Entities; |
3
|
|
|
|
4
|
|
|
/** |
5
|
|
|
* Represents a HootDraft "draft" object, which is the parent object. |
6
|
|
|
* |
7
|
|
|
* A draft has many managers, and managers have many players (picks). |
8
|
|
|
* @property bool $is_locked True if the draft is locked for the current user, false if it's accessible |
9
|
|
|
* @property bool $commish_editable If current user owns the draft OR is an admin |
10
|
|
|
* @property bool $draft_visible True if the draft is publicly visible, false otherwise |
11
|
|
|
* @property string $commish_name Name of the owning commissioner. Comes as an outer join with users. |
12
|
|
|
* @property string $status_display A string that can be used in display of the draft's status |
13
|
|
|
* @property array $sports_teams An array of all of the teams in the pro sport. Capitalized abbreviation is key, full name is value. |
14
|
|
|
* @property array $sports_positions An array of all the positions in the pro sport. Capitalized abbreviation is key, full name is value. |
15
|
|
|
* @property array $sports_colors An array of all the colors used for each position in the draft. Capitalized position abbreviation is key, hex color string is value (with # prepended) |
16
|
|
|
* @property array $sports Array of all possible values used for $draft_sport |
17
|
|
|
* @property array $styles Array of all possible values used for $draft_style |
18
|
|
|
* @property array $statuses Array of all possible values used for $draft_status |
19
|
|
|
*/ |
20
|
|
|
class Draft { |
21
|
|
|
public function __construct() { |
22
|
|
|
//Leaving this here in case any init is needed on new drafts. |
23
|
|
|
} |
24
|
|
|
|
25
|
|
|
/** @var int $draft_id The unique identifier for this draft */ |
26
|
|
|
public $draft_id; |
27
|
|
|
|
28
|
|
|
/** @var int $manager_id The unique identifier for the commissioner that owns this draft */ |
29
|
|
|
public $commish_id; |
30
|
|
|
|
31
|
|
|
/** @var string $draft_name The string identifier for this draft */ |
32
|
|
|
public $draft_name; |
33
|
|
|
|
34
|
|
|
/** @var string $draft_sport */ |
35
|
|
|
public $draft_sport; |
36
|
|
|
|
37
|
|
|
/** @var string $draft_status The description of the status is in */ |
38
|
|
|
public $draft_status; |
39
|
|
|
|
40
|
|
|
/** @var string $draft_style Either 'serpentine' or 'standard' */ |
41
|
|
|
public $draft_style; |
42
|
|
|
|
43
|
|
|
/** @var int $draft_rounds Number of rounds draft will have in total */ |
44
|
|
|
public $draft_rounds; |
45
|
|
|
|
46
|
|
|
/** @var int $draft_rounds Counter used to determine if a board is stale and needs updating. */ |
47
|
|
|
public $draft_counter; |
48
|
|
|
|
49
|
|
|
/** @var string $draft_password Determines draft visibility */ |
50
|
|
|
public $draft_password; |
51
|
|
|
|
52
|
|
|
/** @var string $draft_start_time datetime of when the draft was put into "started" status */ |
53
|
|
|
public $draft_start_time; |
54
|
|
|
|
55
|
|
|
/** @var string $draft_end_time datetime of when the draft was put into "complete" status */ |
56
|
|
|
public $draft_end_time; |
57
|
|
|
|
58
|
|
|
/** @var string $draft_stats_generated datetime of when the statistics for the draft were generated */ |
59
|
|
|
public $draft_stats_generated; |
60
|
|
|
|
61
|
|
|
/** @var int $draft_current_round */ |
62
|
|
|
public $draft_current_round; |
63
|
|
|
|
64
|
|
|
/** @var int $draft_current_pick */ |
65
|
|
|
public $draft_current_pick; |
66
|
|
|
|
67
|
|
|
/** @var bool $nfl_extended Whether or not this draft uses extended NFL positions */ |
68
|
|
|
public $nfl_extended; |
69
|
|
|
|
70
|
|
|
/** @var bool $using_depth_charts Whether or not this draft uses depth chart positions */ |
71
|
|
|
public $using_depth_charts; |
72
|
|
|
} |