Commit | Line | Data |
9c2c91ea |
1 | package # hide from PAUSE |
2 | DBICTest::Schema::Link; |
3 | |
660cf1be |
4 | use base qw/DBICTest::BaseResult/; |
9c2c91ea |
5 | |
6 | use strict; |
7 | use warnings; |
8 | |
9c2c91ea |
9 | __PACKAGE__->table('link'); |
10 | __PACKAGE__->add_columns( |
11 | 'id' => { |
12 | data_type => 'integer', |
13 | is_auto_increment => 1 |
14 | }, |
15 | 'url' => { |
16 | data_type => 'varchar', |
17 | size => 100, |
18 | is_nullable => 1, |
19 | }, |
20 | 'title' => { |
21 | data_type => 'varchar', |
22 | size => 100, |
23 | is_nullable => 1, |
24 | }, |
25 | ); |
26 | __PACKAGE__->set_primary_key('id'); |
27 | |
def17c59 |
28 | __PACKAGE__->has_many ( bookmarks => 'DBICTest::Schema::Bookmark', 'link', { cascade_delete => 0 } ); |
29 | |
9c2c91ea |
30 | use overload '""' => sub { shift->url }, fallback=> 1; |
31 | |
32 | 1; |