line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
# Created by DBIx::Class::Schema::Loader |
3
|
|
|
|
|
|
|
# DO NOT MODIFY THE FIRST PART OF THIS FILE |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use strict; |
6
|
4
|
|
|
4
|
|
1681
|
use warnings; |
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
103
|
|
7
|
4
|
|
|
4
|
|
17
|
|
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
90
|
|
8
|
|
|
|
|
|
|
use base 'DBIx::Class::Core'; |
9
|
4
|
|
|
4
|
|
19
|
|
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
1171
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 NAME |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Bracket::Schema::Result::Player |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=cut |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
__PACKAGE__->table("player"); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 ACCESSORS |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head2 id |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
data_type: INT |
24
|
|
|
|
|
|
|
default_value: undef |
25
|
|
|
|
|
|
|
is_auto_increment: 1 |
26
|
|
|
|
|
|
|
is_nullable: 0 |
27
|
|
|
|
|
|
|
size: 11 |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head2 username |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
data_type: VARCHAR |
32
|
|
|
|
|
|
|
default_value: undef |
33
|
|
|
|
|
|
|
is_nullable: 1 |
34
|
|
|
|
|
|
|
size: 64 |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head2 password |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
data_type: TEXT |
39
|
|
|
|
|
|
|
default_value: undef |
40
|
|
|
|
|
|
|
is_nullable: 0 |
41
|
|
|
|
|
|
|
size: 65535 |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head2 first_name |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
data_type: VARCHAR |
46
|
|
|
|
|
|
|
default_value: undef |
47
|
|
|
|
|
|
|
is_nullable: 0 |
48
|
|
|
|
|
|
|
size: 16 |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head2 last_name |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
data_type: VARCHAR |
53
|
|
|
|
|
|
|
default_value: undef |
54
|
|
|
|
|
|
|
is_nullable: 0 |
55
|
|
|
|
|
|
|
size: 16 |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head2 email |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
data_type: VARCHAR |
60
|
|
|
|
|
|
|
default_value: undef |
61
|
|
|
|
|
|
|
is_nullable: 0 |
62
|
|
|
|
|
|
|
size: 64 |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 active |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
data_type: INT |
67
|
|
|
|
|
|
|
default_value: 1 |
68
|
|
|
|
|
|
|
is_nullable: 0 |
69
|
|
|
|
|
|
|
size: 1 |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head2 points |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
data_type: MEDIUMINT |
74
|
|
|
|
|
|
|
default_value: 0 |
75
|
|
|
|
|
|
|
is_nullable: 0 |
76
|
|
|
|
|
|
|
size: 9 |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=cut |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
__PACKAGE__->add_columns( |
81
|
|
|
|
|
|
|
"id", |
82
|
|
|
|
|
|
|
{ |
83
|
|
|
|
|
|
|
data_type => "INT", |
84
|
|
|
|
|
|
|
default_value => undef, |
85
|
|
|
|
|
|
|
is_auto_increment => 1, |
86
|
|
|
|
|
|
|
is_nullable => 0, |
87
|
|
|
|
|
|
|
size => 11, |
88
|
|
|
|
|
|
|
}, |
89
|
|
|
|
|
|
|
"username", |
90
|
|
|
|
|
|
|
{ |
91
|
|
|
|
|
|
|
data_type => "VARCHAR", |
92
|
|
|
|
|
|
|
default_value => undef, |
93
|
|
|
|
|
|
|
is_nullable => 1, |
94
|
|
|
|
|
|
|
size => 64, |
95
|
|
|
|
|
|
|
}, |
96
|
|
|
|
|
|
|
"password", |
97
|
|
|
|
|
|
|
{ |
98
|
|
|
|
|
|
|
data_type => "TEXT", |
99
|
|
|
|
|
|
|
default_value => undef, |
100
|
|
|
|
|
|
|
is_nullable => 0, |
101
|
|
|
|
|
|
|
size => 65535, |
102
|
|
|
|
|
|
|
}, |
103
|
|
|
|
|
|
|
"first_name", |
104
|
|
|
|
|
|
|
{ |
105
|
|
|
|
|
|
|
data_type => "VARCHAR", |
106
|
|
|
|
|
|
|
default_value => undef, |
107
|
|
|
|
|
|
|
is_nullable => 0, |
108
|
|
|
|
|
|
|
size => 16, |
109
|
|
|
|
|
|
|
}, |
110
|
|
|
|
|
|
|
"last_name", |
111
|
|
|
|
|
|
|
{ |
112
|
|
|
|
|
|
|
data_type => "VARCHAR", |
113
|
|
|
|
|
|
|
default_value => undef, |
114
|
|
|
|
|
|
|
is_nullable => 0, |
115
|
|
|
|
|
|
|
size => 16, |
116
|
|
|
|
|
|
|
}, |
117
|
|
|
|
|
|
|
"email", |
118
|
|
|
|
|
|
|
{ |
119
|
|
|
|
|
|
|
data_type => "VARCHAR", |
120
|
|
|
|
|
|
|
default_value => undef, |
121
|
|
|
|
|
|
|
is_nullable => 0, |
122
|
|
|
|
|
|
|
size => 64, |
123
|
|
|
|
|
|
|
}, |
124
|
|
|
|
|
|
|
"active", |
125
|
|
|
|
|
|
|
{ data_type => "INT", default_value => 1, is_nullable => 0, size => 1 }, |
126
|
|
|
|
|
|
|
"points", |
127
|
|
|
|
|
|
|
{ data_type => "MEDIUMINT", default_value => 0, is_nullable => 0, size => 9 }, |
128
|
|
|
|
|
|
|
); |
129
|
|
|
|
|
|
|
__PACKAGE__->set_primary_key("id"); |
130
|
|
|
|
|
|
|
__PACKAGE__->add_unique_constraint("player_email", ["email"]); |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=head1 RELATIONS |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=head2 picks |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
Type: has_many |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
Related object: L<Bracket::Schema::Result::Pick> |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=cut |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
__PACKAGE__->has_many( |
143
|
|
|
|
|
|
|
"picks", |
144
|
|
|
|
|
|
|
"Bracket::Schema::Result::Pick", |
145
|
|
|
|
|
|
|
{ "foreign.player" => "self.id" }, |
146
|
|
|
|
|
|
|
); |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
=head2 player_roles |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
Type: has_many |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
Related object: L<Bracket::Schema::Result::PlayerRole> |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=cut |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
__PACKAGE__->has_many( |
157
|
|
|
|
|
|
|
"player_roles", |
158
|
|
|
|
|
|
|
"Bracket::Schema::Result::PlayerRole", |
159
|
|
|
|
|
|
|
{ "foreign.player" => "self.id" }, |
160
|
|
|
|
|
|
|
); |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
=head2 region_scores |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
Type: has_many |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
Related object: L<Bracket::Schema::Result::RegionScore> |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
=cut |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
__PACKAGE__->has_many( |
171
|
|
|
|
|
|
|
"region_scores", |
172
|
|
|
|
|
|
|
"Bracket::Schema::Result::RegionScore", |
173
|
|
|
|
|
|
|
{ "foreign.player" => "self.id" }, |
174
|
|
|
|
|
|
|
); |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=head2 tokens |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
Type: has_many |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
Related object: L<Bracket::Schema::Result::Token> |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=cut |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
__PACKAGE__->has_many( |
185
|
|
|
|
|
|
|
"tokens", |
186
|
|
|
|
|
|
|
"Bracket::Schema::Result::Token", |
187
|
|
|
|
|
|
|
{ "foreign.player" => "self.id" }, |
188
|
|
|
|
|
|
|
); |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
# Created by DBIx::Class::Schema::Loader v0.05003 @ 2010-03-15 11:45:32 |
192
|
|
|
|
|
|
|
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:R91hdhwccshwCohquahcNw |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
# You can replace this text with custom content, and it will be preserved on regeneration |
196
|
|
|
|
|
|
|
__PACKAGE__->load_components(qw/ EncodedColumn /); |
197
|
|
|
|
|
|
|
__PACKAGE__->add_columns( |
198
|
|
|
|
|
|
|
"password", { |
199
|
|
|
|
|
|
|
encode_column => 1, |
200
|
|
|
|
|
|
|
# encode_class => 'Digest', |
201
|
|
|
|
|
|
|
# encode_args => { algorithm => 'SHA-256', format => 'base64' }, |
202
|
|
|
|
|
|
|
# encode_check_method => 'check_password', |
203
|
|
|
|
|
|
|
encode_class => 'Crypt::Eksblowfish::Bcrypt', |
204
|
|
|
|
|
|
|
encode_args => { key_nul => 0, cost => 8 }, |
205
|
|
|
|
|
|
|
encode_check_method => 'check_password', |
206
|
|
|
|
|
|
|
# For some reason deploy() wasn't picking up the type or size |
207
|
|
|
|
|
|
|
# so we set it here again. |
208
|
|
|
|
|
|
|
data_type => 'VARCHAR', |
209
|
|
|
|
|
|
|
size => 256, |
210
|
|
|
|
|
|
|
} |
211
|
|
|
|
|
|
|
); |
212
|
|
|
|
|
|
|
=head2 player_roles |
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
Type: has_many |
215
|
|
|
|
|
|
|
Related object: L<Bracket::Schema::Result::PlayerRole> |
216
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
=cut |
218
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
__PACKAGE__->has_many( |
220
|
|
|
|
|
|
|
"player_roles", |
221
|
|
|
|
|
|
|
"Bracket::Schema::Result::PlayerRole", |
222
|
|
|
|
|
|
|
{ "foreign.player" => "self.id" }, |
223
|
|
|
|
|
|
|
); |
224
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
=head2 roles |
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
Relationship bridge across PlayerRole to Role |
228
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
=cut |
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
__PACKAGE__->many_to_many('roles', 'player_roles', 'role'); |
232
|
|
|
|
|
|
|
1; |