| 1 | package Games::Framework::RCP::Database::Result::CombatantStatus; | ||
| 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('combatant_status'); | |
| 12 | 3 | __PACKAGE__->add_columns( | |
| 13 | id_combatant_status => { | ||
| 14 | data_type => 'integer', | ||
| 15 | is_nullable => 0, | ||
| 16 | is_auto_increment => 1, | ||
| 17 | comments => 'ID of the combatant status effect.', | ||
| 18 | extra => {unsigned => 1}, | ||
| 19 | }, | ||
| 20 | fkey_combatant => { | ||
| 21 | data_type => 'integer', | ||
| 22 | is_nullable => 0, | ||
| 23 | comments => 'ID of the combatant.', | ||
| 24 | extra => {unsigned => 1}, | ||
| 25 | }, | ||
| 26 | fkey_status_effect => { | ||
| 27 | data_type => 'integer', | ||
| 28 | is_nullable => 0, | ||
| 29 | comments => 'ID of the status effect.', | ||
| 30 | extra => {unsigned => 1}, | ||
| 31 | }, | ||
| 32 | 'length' => { | ||
| 33 | data_type => 'numeric', | ||
| 34 | size => [12,4], | ||
| 35 | default_value => 31, | ||
| 36 | is_nullable => 0, | ||
| 37 | comments => 'Length of the status effect. 10K and over: permament. -10K and below: indefinite.', | ||
| 38 | }, | ||
| 39 | ); | ||
| 40 | 3 | __PACKAGE__->set_primary_key('id_combatant_status'); | |
| 41 | 3 | __PACKAGE__->add_unique_constraint([qw(fkey_combatant fkey_status_effect)]); | |
| 42 | 3 | __PACKAGE__->belongs_to(combatant => 'Games::Framework::RCP::Database::Result::Combatant', 'fkey_combatant'); | |
| 43 | 3 | __PACKAGE__->belongs_to(status_effect => 'Games::Framework::RCP::Database::Result::StatusEffect', 'fkey_status_effect'); | |
| 44 | |||
| 45 | 2 | ▶ | sub sqlt_deploy_hook { |
|
Subroutine
sqlt_deploy_hook: called CC=1 SCAR=0.0
Pod
documented
| |||
| 46 | 2 | my ($self, $sqlt_table) = @_; | |
| 47 | |||
| 48 | 2 | $sqlt_table->options({ENGINE => 'InnoDB'}); | |
| 49 | 2 | $sqlt_table->options({CHARSET => 'UTF8'}); | |
| 50 | 2 | $sqlt_table->comments('The status effects that the combatants are inflicted with.'); | |
| 51 | } | ||
| 52 | |||
| 53 | 3 | 1; | |
| 54 | |||
| 55 | __END__ | ||