added Viewing.pm
[chaz/p5-DBIx-Class-ResultSet-RecursiveUpdate] / t / lib / DBSchema / Result / Viewing.pm
1 package DBSchema::Result::Viewing;
2 use base 'DBIx::Class::Core';
3
4 __PACKAGE__->table('viewing');
5 __PACKAGE__->add_columns(
6 'user_id' => { data_type => 'integer' },
7 'dvd_id' => { data_type => 'integer' },
8 );
9 __PACKAGE__->set_primary_key(qw/user_id dvd_id/);
10
11 __PACKAGE__->belongs_to(
12 user => 'DBSchema::Result::User',
13 {'foreign.id'=>'self.user_id'},
14 );
15
16 __PACKAGE__->belongs_to(
17 dvd => 'DBSchema::Result::Dvd',
18 {'foreign.id'=>'self.dvd_id'},
19 );
20
21 ;
22
23 1;
This page took 0.034163 seconds and 4 git commands to generate.