Fixed up tests post-merge
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema / Employee.pm
1 package # hide from PAUSE 
2     DBICTest::Schema::Employee;
3
4 use base 'DBIx::Class';
5
6 __PACKAGE__->load_components(qw( Ordered PK::Auto Core ));
7
8 __PACKAGE__->table('employee');
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     },
18     group_id => {
19         data_type => 'integer',
20         is_nullable => 1,
21     },
22     name => {
23         data_type => 'varchar',
24         size      => 100,
25         is_nullable => 1,
26     },
27 );
28
29 __PACKAGE__->set_primary_key('employee_id');
30 __PACKAGE__->position_column('position');
31
32 __PACKAGE__->add_unique_constraint(position_group => [ qw/position group_id/ ]);
33
34 __PACKAGE__->mk_classdata('field_name_for', {
35     employee_id => 'primary key',
36     position    => 'list position',
37     group_id    => 'collection column',
38     name        => 'employee name',
39 });
40
41 1;