RCP/Database/Result/CombinedItem.pm

filter: Statementstmt 100% 23 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 28 / 28 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« RCP/Database/Result/CombatantStatus.pm ↑ Summary RCP/Database/Result/Currency.pm »
1 package Games::Framework::RCP::Database::Result::CombinedItem;
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/Core/);
11 3 __PACKAGE__->table('combined_items');
12 3 __PACKAGE__->add_columns(
13 id_combined_item => {
14 data_type => 'integer',
15 is_nullable => 0,
16 is_auto_increment => 1,
17 comments => 'ID of the combined item.',
18 extra => {unsigned => 1},
19 },
20 fkey_item => {
21 data_type => 'integer',
22 is_nullable => 0,
23 comments => 'ID of the item in the items table.',
24 extra => {unsigned => 1},
25 },
26 fkey_item_part_1 => {
27 data_type => 'integer',
28 is_nullable => 0,
29 comments => 'ID of original item number 1.',
30 extra => {unsigned => 1},
31 },
32 fkey_item_part_2 => {
33 data_type => 'integer',
34 is_nullable => 0,
35 comments => 'ID of original item number 2.',
36 extra => {unsigned => 1},
37 },
38 );
39  
40 3 __PACKAGE__->set_primary_key('id_combined_item');
41 3 __PACKAGE__->add_unique_constraint([qw/fkey_item_part_1 fkey_item_part_2/]);
42 3 __PACKAGE__->belongs_to(items => 'Games::Framework::RCP::Database::Result::Item', 'fkey_item');
43 3 __PACKAGE__->belongs_to(orig_item_1 => 'Games::Framework::RCP::Database::Result::Item', 'fkey_item_part_1');
44 3 __PACKAGE__->belongs_to(orig_item_2 => 'Games::Framework::RCP::Database::Result::Item', 'fkey_item_part_2');
45  
46 2 ▶sub sqlt_deploy_hook {
Subroutine sqlt_deploy_hook: called CC=1 SCAR=0.0
Pod documented
47 2 my ($self, $sqlt_table) = @_;
48
49 2 $sqlt_table->options({ENGINE => 'InnoDB'});
50 2 $sqlt_table->options({CHARSET => 'UTF8'});
51 2 $sqlt_table->comments('The list of item combinations.');
52 }
53  
54 3 1;
55  
56 __END__
« RCP/Database/Result/CombatantStatus.pm ↑ Summary RCP/Database/Result/Currency.pm »