Commit | Line | Data |
406086f3 |
1 | package # hide from PAUSE |
d2739840 |
2 | RestTest::Schema::Result::Track; |
3 | |
4 | use base 'DBIx::Class::Core'; |
5 | __PACKAGE__->table('track'); |
6 | __PACKAGE__->add_columns( |
7 | 'trackid' => { |
8 | data_type => 'integer', |
9 | is_auto_increment => 1, |
10 | }, |
11 | 'cd' => { |
12 | data_type => 'integer', |
13 | }, |
14 | 'position' => { |
15 | data_type => 'integer', |
16 | accessor => 'pos', |
17 | default_value => 0 |
18 | }, |
19 | 'title' => { |
20 | data_type => 'varchar', |
21 | size => 100, |
22 | }, |
23 | last_updated_on => { |
24 | data_type => 'datetime', |
25 | accessor => 'updated_date', |
26 | is_nullable => 1 |
27 | }, |
28 | ); |
29 | __PACKAGE__->set_primary_key('trackid'); |
30 | |
31 | __PACKAGE__->add_unique_constraint([ qw/cd position/ ]); |
32 | __PACKAGE__->add_unique_constraint([ qw/cd title/ ]); |
33 | |
34 | __PACKAGE__->belongs_to( cd => 'RestTest::Schema::Result::CD'); |
35 | |
36 | 1; |