Commit | Line | Data |
65c2b042 |
1 | package # hide from PAUSE |
2 | DBICTest::Schema::BooksInLibrary; |
3 | |
4 | use base qw/DBICTest::BaseResult/; |
5 | |
6 | __PACKAGE__->table('books'); |
7 | __PACKAGE__->add_columns( |
8 | 'id' => { |
9 | data_type => 'integer', |
10 | is_auto_increment => 1, |
11 | }, |
12 | 'source' => { |
13 | data_type => 'varchar', |
14 | size => '100', |
15 | }, |
16 | 'owner' => { |
17 | data_type => 'integer', |
18 | }, |
19 | 'title' => { |
20 | data_type => 'varchar', |
21 | size => '100', |
22 | }, |
23 | 'price' => { |
24 | data_type => 'integer', |
25 | is_nullable => 1, |
26 | }, |
27 | ); |
28 | __PACKAGE__->set_primary_key('id'); |
29 | |
30 | __PACKAGE__->resultset_attributes({where => { source => "Library" } }); |
31 | |
13a2f031 |
32 | __PACKAGE__->belongs_to ( owner => 'DBICTest::Schema::Owners', 'owner' ); |
33 | |
65c2b042 |
34 | 1; |