File Coverage

blib/lib/Bracket/Schema/Result/Game.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             package Bracket::Schema::Result::Game;
2              
3             # Created by DBIx::Class::Schema::Loader
4             # DO NOT MODIFY THE FIRST PART OF THIS FILE
5              
6 1     1   776 use strict;
  1         2  
  1         37  
7 1     1   5 use warnings;
  1         2  
  1         28  
8              
9 1     1   6 use base 'DBIx::Class::Core';
  1         2  
  1         226  
10              
11              
12             =head1 NAME
13              
14             Bracket::Schema::Result::Game
15              
16             =cut
17              
18             __PACKAGE__->table("game");
19              
20             =head1 ACCESSORS
21              
22             =head2 id
23              
24             data_type: INT
25             default_value: undef
26             is_nullable: 0
27             size: 11
28              
29             =head2 winner
30              
31             data_type: INT
32             default_value: undef
33             is_foreign_key: 1
34             is_nullable: 1
35             size: 11
36              
37             =head2 round
38              
39             data_type: TINYINT
40             default_value: 1
41             is_nullable: 0
42             size: 4
43              
44             =head2 lower_seed
45              
46             data_type: TINYINT
47             default_value: 0
48             is_nullable: 0
49             size: 1
50              
51             =cut
52              
53             __PACKAGE__->add_columns(
54             "id",
55             { data_type => "INT", default_value => undef, is_nullable => 0, size => 11 },
56             "winner",
57             {
58             data_type => "INT",
59             default_value => undef,
60             is_foreign_key => 1,
61             is_nullable => 1,
62             size => 11,
63             },
64             "round",
65             { data_type => "TINYINT", default_value => 1, is_nullable => 0, size => 4 },
66             "lower_seed",
67             { data_type => "TINYINT", default_value => 0, is_nullable => 0, size => 1 },
68             );
69             __PACKAGE__->set_primary_key("id");
70              
71             =head1 RELATIONS
72              
73             =head2 winner
74              
75             Type: belongs_to
76              
77             Related object: L<Bracket::Schema::Result::Team>
78              
79             =cut
80              
81             __PACKAGE__->belongs_to(
82             "winner",
83             "Bracket::Schema::Result::Team",
84             { id => "winner" },
85             { join_type => "LEFT" },
86             );
87              
88             =head2 picks
89              
90             Type: has_many
91              
92             Related object: L<Bracket::Schema::Result::Pick>
93              
94             =cut
95              
96             __PACKAGE__->has_many(
97             "picks",
98             "Bracket::Schema::Result::Pick",
99             { "foreign.game" => "self.id" },
100             );
101              
102              
103             # Created by DBIx::Class::Schema::Loader v0.05003 @ 2010-03-07 15:22:35
104             # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kdG47fAPyic/y4+PvlM5SQ
105              
106              
107             # You can replace this text with custom content, and it will be preserved on regeneration
108             1;