]> Dogcows Code - chaz/p5-DBIx-Class-ResultSet-RecursiveUpdate/blob - Dvd.pm
f761f764300ab2195275cbecaa23f43d530fa20d
[chaz/p5-DBIx-Class-ResultSet-RecursiveUpdate] / Dvd.pm
1 package DBSchema::Result::Dvd;
2
3 # Created by DBIx::Class::Schema::Loader v0.03000 @ 2006-10-02 08:24:09
4
5 use strict;
6 use warnings;
7
8 use base 'DBIx::Class';
9 use overload '""' => sub {$_[0]->name}, fallback => 1;
10
11 use lib '../../DBIx-Class-HTML-FormFu/lib/';
12 __PACKAGE__->load_components(qw/IntrospectableM2M Core/);
13 __PACKAGE__->table('dvd');
14 __PACKAGE__->add_columns(
15 'id' => {
16 data_type => 'integer',
17 is_auto_increment => 1
18 },
19 'name' => {
20 data_type => 'varchar',
21 size => 100,
22 is_nullable => 1,
23 },
24 'imdb_id' => {
25 data_type => 'varchar',
26 size => 100,
27 is_nullable => 1,
28 },
29 'owner' => { data_type => 'integer' },
30 'current_borrower' => {
31 data_type => 'integer',
32 is_nullable => 1,
33 },
34
35 'creation_date' => {
36 data_type => 'datetime',
37 is_nullable => 1,
38 },
39 'alter_date' => {
40 data_type => 'datetime',
41 is_nullable => 1,
42 },
43 );
44 __PACKAGE__->set_primary_key('id');
45 __PACKAGE__->belongs_to('owner', 'DBSchema::Result::User', { id => 'owner' });
46 __PACKAGE__->belongs_to('current_borrower', 'DBSchema::Result::User', { id => 'current_borrower' });
47 __PACKAGE__->has_many('dvdtags', 'Dvdtag', { 'foreign.dvd' => 'self.id' });
48 __PACKAGE__->has_many('viewings', 'Viewing', { 'foreign.dvd_id' => 'self.id' });
49 __PACKAGE__->many_to_many('tags', 'dvdtags' => 'tag');
50 __PACKAGE__->might_have(
51 liner_notes => 'DBSchema::Result::LinerNotes', undef,
52 { proxy => [ qw/notes/ ] },
53 );
54 __PACKAGE__->add_relationship('like_has_many', 'DBSchema::Result::Twokeys', { 'foreign.dvd_name' => 'self.name' }, { accessor_name => 'like_has_many' } );
55
56
57 1;
58
This page took 0.039701 seconds and 3 git commands to generate.