line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::DBIx::Class::Example::Schema::Result::Company; { |
2
|
15
|
|
|
15
|
|
17402
|
use base 'Test::DBIx::Class::Example::Schema::Result'; |
|
15
|
|
|
|
|
25
|
|
|
15
|
|
|
|
|
2531
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
__PACKAGE__->table('company'); |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
__PACKAGE__->add_columns( |
7
|
|
|
|
|
|
|
company_id => { |
8
|
|
|
|
|
|
|
data_type => 'varchar', |
9
|
|
|
|
|
|
|
size => '36', |
10
|
|
|
|
|
|
|
is_nullable => 0, |
11
|
|
|
|
|
|
|
}, |
12
|
|
|
|
|
|
|
name => { |
13
|
|
|
|
|
|
|
data_type => 'varchar', |
14
|
|
|
|
|
|
|
size => '24', |
15
|
|
|
|
|
|
|
is_nullable => 0, |
16
|
|
|
|
|
|
|
}, |
17
|
|
|
|
|
|
|
created => { |
18
|
|
|
|
|
|
|
data_type => 'timestamp', |
19
|
|
|
|
|
|
|
set_on_create => 1, |
20
|
|
|
|
|
|
|
is_nullable => 0, |
21
|
|
|
|
|
|
|
}, |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
__PACKAGE__->set_primary_key('company_id'); |
25
|
|
|
|
|
|
|
__PACKAGE__->uuid_columns('company_id'); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__PACKAGE__->has_many( |
28
|
|
|
|
|
|
|
company_employee_rs => 'Test::DBIx::Class::Example::Schema::Result::Company::Employee', |
29
|
|
|
|
|
|
|
{ 'foreign.fk_company_id' => 'self.company_id'} |
30
|
|
|
|
|
|
|
); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__PACKAGE__->many_to_many( |
33
|
|
|
|
|
|
|
employees => 'company_employee_rs', 'employee', |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
} 1 |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 NAME |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Test::DBIx::Class::Example::Schema::Result::Company - A company |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 DESCRIPTION |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
A company provides jobs and has employees |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 SEE ALSO |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
The following modules or resources may be of interest. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
L<DBIx::Class> |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 AUTHOR |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
John Napiorkowski C<< <jjnapiork@cpan.org> >> |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Copyright 2009, John Napiorkowski C<< <jjnapiork@cpan.org> >> |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify |
63
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=cut |