Commit | Line | Data |
80021def |
1 | package # hide from PAUSE |
2 | DBICTest::Schema::Employee::AdjacencyList; |
3 | |
4 | use base 'DBIx::Class'; |
5 | |
6 | __PACKAGE__->load_components(qw( |
7 | Tree::AdjacencyList |
8 | PK::Auto |
9 | Core |
10 | )); |
11 | |
12 | __PACKAGE__->table('employees_adjacencylist'); |
13 | |
14 | __PACKAGE__->add_columns( |
15 | employee_id => { |
16 | data_type => 'integer', |
17 | is_auto_increment => 1 |
18 | }, |
19 | parent_id => { |
20 | data_type => 'integer', |
21 | is_nullable => 1, |
22 | }, |
23 | name => { |
24 | data_type => 'varchar', |
25 | size => 100, |
26 | is_nullable => 1, |
27 | }, |
28 | ); |
29 | |
30 | __PACKAGE__->set_primary_key('employee_id'); |
31 | __PACKAGE__->parent_column('parent_id'); |
32 | |
33 | __PACKAGE__->mk_classdata('field_name_for', { |
34 | employee_id => 'primary key', |
35 | parent_id => 'parent id', |
36 | name => 'employee name', |
37 | }); |
38 | |
39 | 1; |