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