]> Dogcows Code - chaz/p5-DBIx-Class-ResultSet-RecursiveUpdate/blob - t/lib/DBSchema/Result/Dvd.pm
d87147c24575e74695d65aec3a80a2ecaf8106c0
[chaz/p5-DBIx-Class-ResultSet-RecursiveUpdate] / t / lib / DBSchema / Result / 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('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', 'User', { id => 'owner' });
46 __PACKAGE__->belongs_to('current_borrower', 'User', { id => 'current_borrower' });
47 __PACKAGE__->has_many('dvdtags', 'Dvdtag', { 'foreign.dvd' => 'self.id' });
48 __PACKAGE__->many_to_many('tags', 'dvdtags' => 'tag');
49 __PACKAGE__->might_have(
50 liner_notes => 'DBSchema::Result::LinerNotes', undef,
51 { proxy => [ qw/notes/ ] },
52 );
53
54
55 1;
56
This page took 0.036693 seconds and 3 git commands to generate.