File: Node.pm

package info (click to toggle)
libdbix-class-tree-perl 0.03003-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 244 kB
  • sloc: perl: 1,554; sql: 8; makefile: 8
file content (27 lines) | stat: -rw-r--r-- 360 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package TreeTest::Schema::Node;
use strict;
use warnings;

use base qw( DBIx::Class );

__PACKAGE__->load_components(qw(
    PK::Auto
    Core
));

__PACKAGE__->table('nodes');

__PACKAGE__->add_columns(
    node_id => { is_auto_increment => 1 },
  qw/
    name
    parent_id
    position
    lft
    rgt
  /
);

__PACKAGE__->set_primary_key( 'node_id' );

1;