Commit | Line | Data |
---|---|---|
6ebf5cbb | 1 | package # hide from PAUSE |
2 | ViewDeps::Result::Bar; | |
3 | ||
4 | use strict; | |
5 | use warnings; | |
e55d9d89 | 6 | use base qw(ViewDeps::Result::Foo); |
6ebf5cbb | 7 | |
1e70d9dc | 8 | use ViewDeps::Result::Mixin; |
e55d9d89 | 9 | use ViewDeps::Result::Baz; |
6ebf5cbb | 10 | |
11 | __PACKAGE__->table('bar'); | |
12 | ||
e55d9d89 | 13 | __PACKAGE__->result_source_instance->deploy_depends_on( |
bf5c3a3f | 14 | ["ViewDeps::Result::Baz", "ViewDeps::Result::Mixin"] |
6ebf5cbb | 15 | ); |
16 | ||
17 | __PACKAGE__->add_columns( | |
18 | b => { data_type => 'integer' } | |
19 | ); | |
20 | ||
21 | __PACKAGE__->belongs_to( | |
1e70d9dc | 22 | 'table', |
6ebf5cbb | 23 | 'ViewDeps::Result::JustATable', |
24 | { 'foreign.id' => 'self.b' }, | |
25 | ); | |
26 | ||
27 | __PACKAGE__->has_many( | |
28 | 'foos', | |
29 | 'ViewDeps::Result::Foo', | |
1e70d9dc | 30 | { 'foreign.id' => 'self.id' } |
6ebf5cbb | 31 | ); |
32 | ||
33 | 1; |