RCP/Database/Result/Color.pm

filter: Statementstmt 100% 28 / 28 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 34 / 34 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« RCP/Database/Result/ClassMove.pm ↑ Summary RCP/Database/Result/Combatant.pm »
1 package Games::Framework::RCP::Database::Result::Color;
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 3 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 3 our $VERSION = '0.23';
8  
9 3 ▶use base qw/DBIx::Class/;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 3 __PACKAGE__->load_components(qw/Core/);
12 3 __PACKAGE__->table('colors');
13 3 __PACKAGE__->add_columns(
14 id_color => {
15 data_type => 'integer',
16 is_nullable => 0,
17 is_auto_increment => 1,
18 comments => 'ID of the color.',
19 extra => {unsigned => 1},
20 },
21 fg => {
22 data_type => 'varchar',
23 size => 8,
24 is_nullable => 0,
25 comments => 'Foreground color.',
26 },
27 bg => {
28 data_type => 'varchar',
29 size => 8,
30 is_nullable => 0,
31 comments => 'Background color.',
32 },
33 );
34 3 __PACKAGE__->set_primary_key('id_color');
35 3 __PACKAGE__->add_unique_constraint([qw/fg bg/]);
36  
37 3 __PACKAGE__->might_have(move_type => 'Games::Framework::RCP::Database::Result::MoveType', 'fkey_color', {cascade_delete => 0});
38  
39 3 __PACKAGE__->might_have(character => 'Games::Framework::RCP::Database::Result::Character', 'fkey_color', {cascade_delete => 0});
40  
41 3 __PACKAGE__->might_have(status_effect => 'Games::Framework::RCP::Database::Result::StatusEffect', 'fkey_color', {cascade_delete => 0});
42  
43 3 __PACKAGE__->might_have(currency => 'Games::Framework::RCP::Database::Result::Currency', 'fkey_color', {cascade_delete => 0});
44  
45 3 __PACKAGE__->might_have(hazard_set => 'Games::Framework::RCP::Database::Result::HazardSet', 'fkey_color', {cascade_delete => 0});
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 foreground/background color combinations.');
53 }
54  
55 3 1;
56  
57 __END__
« RCP/Database/Result/ClassMove.pm ↑ Summary RCP/Database/Result/Combatant.pm »