| 1 | package Games::Framework::RCP::Database::Result::MoveWithFlag; | ||
| 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.23'; | |
| 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('moves_with_flags'); | |
| 12 | 3 | __PACKAGE__->add_columns( | |
| 13 | id_move_with_flag => { | ||
| 14 | data_type => 'integer', | ||
| 15 | is_nullable => 0, | ||
| 16 | is_auto_increment => 1, | ||
| 17 | comments => 'ID of the move/move flag combination.', | ||
| 18 | extra => {unsigned => 1}, | ||
| 19 | }, | ||
| 20 | fkey_move => { | ||
| 21 | data_type => 'integer', | ||
| 22 | is_nullable => 0, | ||
| 23 | comments => 'ID of the move.', | ||
| 24 | extra => {unsigned => 1}, | ||
| 25 | }, | ||
| 26 | fkey_move_flag => { | ||
| 27 | data_type => 'integer', | ||
| 28 | is_nullable => 0, | ||
| 29 | comments => 'ID of the move flag.', | ||
| 30 | extra => {unsigned => 1}, | ||
| 31 | }, | ||
| 32 | ); | ||
| 33 | |||
| 34 | 3 | __PACKAGE__->set_primary_key('id_move_with_flag'); | |
| 35 | 3 | __PACKAGE__->add_unique_constraint(['fkey_move', 'fkey_move_flag']); | |
| 36 | 3 | __PACKAGE__->belongs_to(moves => 'Games::Framework::RCP::Database::Result::Move', 'fkey_move'); | |
| 37 | 3 | __PACKAGE__->belongs_to(move_flags => 'Games::Framework::RCP::Database::Result::MoveFlag', 'fkey_move_flag'); | |
| 38 | |||
| 39 | 2 | ▶ | sub sqlt_deploy_hook { |
|
Subroutine
sqlt_deploy_hook: called CC=1 SCAR=0.0
Pod
documented
| |||
| 40 | 2 | my ($self, $sqlt_table) = @_; | |
| 41 | |||
| 42 | 2 | $sqlt_table->options({ENGINE => 'InnoDB'}); | |
| 43 | 2 | $sqlt_table->options({CHARSET => 'UTF8'}); | |
| 44 | 2 | $sqlt_table->comments('Every move with all of the possible flags.'); | |
| 45 | } | ||
| 46 | |||
| 47 | 3 | 1; | |
| 48 | |||
| 49 | __END__ | ||