1 package MyApp::Schema::Result::Cd;
6 use base qw( DBIx::Class::Core );
8 __PACKAGE__->table('cd');
10 __PACKAGE__->add_columns(
12 data_type => 'integer',
13 is_auto_increment => 1
16 data_type => 'integer',
22 data_type => 'datetime',
27 __PACKAGE__->set_primary_key('cdid');
29 __PACKAGE__->add_unique_constraint([qw( title artist )]);
31 __PACKAGE__->belongs_to('artist' => 'MyApp::Schema::Result::Artist');
32 __PACKAGE__->has_many('tracks' => 'MyApp::Schema::Result::Track');