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 |
0a298c73 |
8 | Positioned |
80021def |
9 | PK::Auto |
10 | Core |
11 | )); |
12 | |
13 | __PACKAGE__->table('employees_adjacencylist'); |
14 | |
15 | __PACKAGE__->add_columns( |
16 | employee_id => { |
17 | data_type => 'integer', |
18 | is_auto_increment => 1 |
19 | }, |
20 | parent_id => { |
21 | data_type => 'integer', |
0a298c73 |
22 | }, |
23 | position => { |
24 | data_type => 'integer', |
80021def |
25 | is_nullable => 1, |
26 | }, |
27 | name => { |
28 | data_type => 'varchar', |
29 | size => 100, |
30 | is_nullable => 1, |
31 | }, |
32 | ); |
33 | |
34 | __PACKAGE__->set_primary_key('employee_id'); |
35 | __PACKAGE__->parent_column('parent_id'); |
0a298c73 |
36 | __PACKAGE__->position_column('position'); |
80021def |
37 | |
38 | __PACKAGE__->mk_classdata('field_name_for', { |
39 | employee_id => 'primary key', |
40 | parent_id => 'parent id', |
0a298c73 |
41 | position => 'list order', |
80021def |
42 | name => 'employee name', |
43 | }); |
44 | |
45 | 1; |