Documentation improvements cherry-picked from latest
[dbsrgits/DBIx-Class.git] / examples / Schema / MyApp / Schema / Result / Track.pm
1 package MyApp::Schema::Result::Track;
2
3 use warnings;
4 use strict;
5
6 use base qw( DBIx::Class::Core );
7
8 __PACKAGE__->table('track');
9
10 __PACKAGE__->add_columns(
11   trackid => {
12     data_type => 'integer',
13     is_auto_increment => 1
14   },
15   cdid => {
16     data_type => 'integer',
17   },
18   title => {
19     data_type => 'text',
20   },
21 );
22
23 __PACKAGE__->set_primary_key('trackid');
24
25 __PACKAGE__->add_unique_constraint([qw( title cdid )]);
26
27 __PACKAGE__->belongs_to('cd' => 'MyApp::Schema::Result::Cd', 'cdid');
28
29 1;