Commit | Line | Data |
---|---|---|
82958127 | 1 | package TreeTest::Schema::Node; |
2 | use strict; | |
3 | use warnings; | |
4 | ||
82958127 | 5 | use base qw( DBIx::Class ); |
6 | ||
7 | __PACKAGE__->load_components(qw( | |
8 | PK::Auto | |
9 | Core | |
10 | )); | |
11 | ||
12 | __PACKAGE__->table('nodes'); | |
13 | ||
0179986e | 14 | __PACKAGE__->add_columns( |
15 | node_id => { is_auto_increment => 1 }, | |
16 | qw/ | |
82958127 | 17 | name |
18 | parent_id | |
19 | position | |
20 | lft | |
21 | rgt | |
0179986e | 22 | / |
23 | ); | |
82958127 | 24 | |
25 | __PACKAGE__->set_primary_key( 'node_id' ); | |
26 | ||
27 | 1; |