]> Dogcows Code - chaz/p5-DBIx-Class-ResultSet-RecursiveUpdate/commitdiff
added Viewing.pm
authorzby <zby@bd8105ee-0ff8-0310-8827-fb3f25b6796d>
Wed, 28 Jan 2009 15:09:23 +0000 (15:09 +0000)
committerzby <zby@bd8105ee-0ff8-0310-8827-fb3f25b6796d>
Wed, 28 Jan 2009 15:09:23 +0000 (15:09 +0000)
t/lib/DBSchema/Result/Viewing.pm [new file with mode: 0755]

diff --git a/t/lib/DBSchema/Result/Viewing.pm b/t/lib/DBSchema/Result/Viewing.pm
new file mode 100755 (executable)
index 0000000..13dcaa0
--- /dev/null
@@ -0,0 +1,23 @@
+package DBSchema::Result::Viewing;
+use base 'DBIx::Class::Core';
+
+__PACKAGE__->table('viewing');
+__PACKAGE__->add_columns(
+  'user_id' => { data_type => 'integer' },
+  'dvd_id' => { data_type => 'integer' },
+);
+__PACKAGE__->set_primary_key(qw/user_id dvd_id/);
+
+__PACKAGE__->belongs_to(
+    user => 'DBSchema::Result::User',
+    {'foreign.id'=>'self.user_id'},
+);
+
+__PACKAGE__->belongs_to( 
+    dvd => 'DBSchema::Result::Dvd',
+    {'foreign.id'=>'self.dvd_id'},
+);
+
+;
+
+1;
This page took 0.022975 seconds and 4 git commands to generate.