| 1 | package DBIO::Test::Schema::Employee; | ||
| 2 | # ABSTRACT: Test result class for the employee table with ordering | ||
| 3 | |||
| 4 | 256 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 256 | our $VERSION = '0.900007'; | |
| 7 | |||
| 8 | 256 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 256 | ▶ | use base qw/DBIO::Test::BaseResult/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | 256 | __PACKAGE__->load_components(qw( Ordered )); | |
| 13 | |||
| 14 | 256 | __PACKAGE__->table('employee'); | |
| 15 | |||
| 16 | 256 | __PACKAGE__->add_columns( | |
| 17 | employee_id => { | ||
| 18 | data_type => 'integer', | ||
| 19 | is_auto_increment => 1 | ||
| 20 | }, | ||
| 21 | position => { | ||
| 22 | data_type => 'integer', | ||
| 23 | position => 1, | ||
| 24 | }, | ||
| 25 | group_id => { | ||
| 26 | data_type => 'integer', | ||
| 27 | is_nullable => 1, | ||
| 28 | }, | ||
| 29 | group_id_2 => { | ||
| 30 | data_type => 'integer', | ||
| 31 | is_nullable => 1, | ||
| 32 | }, | ||
| 33 | group_id_3 => { | ||
| 34 | data_type => 'integer', | ||
| 35 | is_nullable => 1, | ||
| 36 | }, | ||
| 37 | name => { | ||
| 38 | data_type => 'varchar', | ||
| 39 | size => 100, | ||
| 40 | is_nullable => 1, | ||
| 41 | }, | ||
| 42 | encoded => { | ||
| 43 | data_type => 'integer', | ||
| 44 | is_nullable => 1, | ||
| 45 | }, | ||
| 46 | ); | ||
| 47 | |||
| 48 | 256 | __PACKAGE__->set_primary_key('employee_id'); | |
| 49 | |||
| 50 | # Do not add unique constraints here - different groups are used throughout | ||
| 51 | # the ordered tests | ||
| 52 | |||
| 53 | 256 | __PACKAGE__->belongs_to (secretkey => 'DBIO::Test::Schema::Encoded', 'encoded', { | |
| 54 | join_type => 'left' | ||
| 55 | }); | ||
| 56 | |||
| 57 | 256 | 1; | |
| 58 | |||
| 59 | __END__ | ||