50c18d102c7ccdc7790e67d6e2fe189e0e6c02fb
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema / Bookmark.pm
1 package # hide from PAUSE
2     DBICTest::Schema::Bookmark;
3
4 use base qw/DBICTest::BaseResult/;
5
6 use strict;
7 use warnings;
8
9 __PACKAGE__->table('bookmark');
10 __PACKAGE__->add_columns(
11     'id' => {
12         data_type => 'integer',
13         is_auto_increment => 1
14     },
15     'link' => {
16         data_type => 'integer',
17         is_nullable => 1,
18     },
19 );
20
21 __PACKAGE__->set_primary_key('id');
22
23 require DBICTest::Schema::Link; # so we can get a columnlist
24 __PACKAGE__->belongs_to(
25     link => 'DBICTest::Schema::Link', 'link', {
26     on_delete => 'SET NULL',
27     join_type => 'LEFT',
28     proxy => { map { join('_', 'link', $_) => $_ } DBICTest::Schema::Link->columns },
29 });
30
31 1;