New experimental TokenGroup component.
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema / Employee / AdjacencyList.pm
CommitLineData
80021def 1package # hide from PAUSE
2 DBICTest::Schema::Employee::AdjacencyList;
3
4use base 'DBIx::Class';
5
6__PACKAGE__->load_components(qw(
7 Tree::AdjacencyList
1e3ff014 8 Positional
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
451;