Commit | Line | Data |
8273e845 |
1 | package # hide from PAUSE |
4e298a80 |
2 | DBICTest::Schema::Employee; |
80021def |
3 | |
4a233f30 |
4 | use warnings; |
5 | use strict; |
6 | |
660cf1be |
7 | use base qw/DBICTest::BaseResult/; |
80021def |
8 | |
ff657a43 |
9 | __PACKAGE__->load_components(qw( Ordered )); |
80021def |
10 | |
38e48163 |
11 | __PACKAGE__->table('employee'); |
80021def |
12 | |
13 | __PACKAGE__->add_columns( |
14 | employee_id => { |
15 | data_type => 'integer', |
16 | is_auto_increment => 1 |
17 | }, |
18 | position => { |
19 | data_type => 'integer', |
20 | }, |
169bb185 |
21 | group_id => { |
22 | data_type => 'integer', |
23 | is_nullable => 1, |
24 | }, |
1d941d67 |
25 | group_id_2 => { |
26 | data_type => 'integer', |
27 | is_nullable => 1, |
28 | }, |
9beded8a |
29 | group_id_3 => { |
30 | data_type => 'integer', |
31 | is_nullable => 1, |
32 | }, |
80021def |
33 | name => { |
34 | data_type => 'varchar', |
35 | size => 100, |
36 | is_nullable => 1, |
37 | }, |
68888c09 |
38 | encoded => { |
39 | data_type => 'integer', |
40 | is_nullable => 1, |
41 | }, |
80021def |
42 | ); |
43 | |
44 | __PACKAGE__->set_primary_key('employee_id'); |
45 | __PACKAGE__->position_column('position'); |
46 | |
b33d634c |
47 | # Do not add unique constraints here - different groups are used throughout |
48 | # the ordered tests |
80021def |
49 | |
68888c09 |
50 | __PACKAGE__->belongs_to (secretkey => 'DBICTest::Schema::Encoded', 'encoded', { |
51 | join_type => 'left' |
52 | }); |
53 | |
80021def |
54 | 1; |