RCP/Database/Result/MoveFlag.pm

filter: Statementstmt 100% 24 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 29 / 29 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« RCP/Database/Result/MoveCost.pm ↑ Summary RCP/Database/Result/MoveType.pm »
1 package Games::Framework::RCP::Database::Result::MoveFlag;
2  
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 3 our $VERSION = '0.22';
7  
8 3 ▶use base qw/DBIx::Class/;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 3 __PACKAGE__->load_components(qw/UTF8Columns Core/);
11 3 __PACKAGE__->table('move_flags');
12 3 __PACKAGE__->add_columns(
13 id_move_flag => {
14 data_type => 'integer',
15 is_nullable => 0,
16 is_auto_increment => 1,
17 comments => 'ID of the move flag.',
18 extra => {unsigned => 1},
19 },
20 name => {
21 data_type => 'varchar',
22 size => 32,
23 is_nullable => 0,
24 comments => 'Name of the move flag.',
25 },
26 abbr => {
27 data_type => 'varchar',
28 size => 8,
29 is_nullable => 0,
30 comments => 'Abbreviation of the move flag: meant for public.',
31 },
32 description => {
33 data_type => 'varchar',
34 size => 256,
35 is_nullable => 1,
36 comments => 'Description of the move flag: meant for private.',
37 }
38 );
39  
40 3 __PACKAGE__->utf8_columns(qw/name abbr description/);
41 3 __PACKAGE__->set_primary_key('id_move_flag');
42 3 __PACKAGE__->add_unique_constraint(['name']);
43 3 __PACKAGE__->add_unique_constraint(['abbr']);
44 3 __PACKAGE__->has_many(moves_with_flags => 'Games::Framework::RCP::Database::Result::MoveWithFlag', 'fkey_move_flag');
45 3 __PACKAGE__->many_to_many(moves => 'moves_with_flags', 'move_flags');
46  
47 2 ▶sub sqlt_deploy_hook {
Subroutine sqlt_deploy_hook: called CC=1 SCAR=0.0
Pod documented
48 2 my ($self, $sqlt_table) = @_;
49
50 2 $sqlt_table->options({ENGINE => 'InnoDB'});
51 2 $sqlt_table->options({CHARSET => 'UTF8'});
52 2 $sqlt_table->comments('The list of the various move flags.');
53 }
54  
55 3 1;
56  
57 __END__
« RCP/Database/Result/MoveCost.pm ↑ Summary RCP/Database/Result/MoveType.pm »