RCP/Database/Result/CombatantCurrency.pm

filter: Statementstmt 100% 24 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 30 / 30 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« RCP/Database/Result/Combatant.pm ↑ Summary RCP/Database/Result/CombatantEquipHistory.pm »
1 package Games::Framework::RCP::Database::Result::CombatantCurrency;
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.22';
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('combatant_currency');
13 3 __PACKAGE__->add_columns(
14 id_combatant_inventory => {
15 data_type => 'integer',
16 is_nullable => 0,
17 is_auto_increment => 1,
18 comments => 'ID of the combatant / currency combination.',
19 extra => {unsigned => 1},
20 },
21 fkey_combatant => {
22 data_type => 'integer',
23 is_nullable => 0,
24 comments => 'ID of the combatant.',
25 extra => {unsigned => 1},
26 },
27 fkey_currency => {
28 data_type => 'integer',
29 is_nullable => 0,
30 comments => 'ID of the currency.',
31 extra => {unsigned => 1},
32 },
33 quantity => {
34 data_type => 'numeric',
35 size => [12,4],
36 is_nullable => 1,
37 default_value => 0,
38 comments => 'How much of this currency does the combatant have in battle?',
39 },
40 );
41  
42 3 __PACKAGE__->set_primary_key('id_combatant_inventory');
43  
44 3 __PACKAGE__->belongs_to(currency => 'Games::Framework::RCP::Database::Result::Currency', 'fkey_currency');
45  
46 3 __PACKAGE__->belongs_to(combatants => 'Games::Framework::RCP::Database::Result::Combatant', 'fkey_combatant');
47  
48 2 ▶sub sqlt_deploy_hook {
Subroutine sqlt_deploy_hook: called CC=1 SCAR=0.0
Pod documented
49 2 my ($self, $sqlt_table) = @_;
50
51 2 $sqlt_table->options({ENGINE => 'InnoDB'});
52 2 $sqlt_table->options({CHARSET => 'UTF8'});
53 2 $sqlt_table->comments('Every currency a combatant has in battle.');
54 }
55  
56 3 1;
57  
58 __END__
« RCP/Database/Result/Combatant.pm ↑ Summary RCP/Database/Result/CombatantEquipHistory.pm »