PopulateMore/Test/Schema/Result/EmploymentHistory.pm

filter: Statementstmt 100% 8 / 8 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 1 / 1 Podpod n/a totaltotal 100% 9 / 9 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
CRAP 1.0
« PopulateMore/Test/Schema/Result/CompanyPerson.pm ↑ Summary PopulateMore/Test/Schema/Result/FriendList.pm »
1 package #hide from pause
2 DBIx::Class::Schema::PopulateMore::Test::Schema::Result::EmploymentHistory;
3  
4 3 ▶use parent 'DBIx::Class::Schema::PopulateMore::Test::Schema::Result';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 =head1 NAME
7  
8 DBIx::Class::Schema::PopulateMore::Test::Schema::Result::EmploymentHistory - Information about a Persons as an Employee;
9  
10 =head1 DESCRIPTION
11  
12 Additional Information about a person when working for a company
13  
14 =head1 ATTRIBUTES
15  
16 This class defines the following attributes.
17  
18 =head1 PACKAGE METHODS
19  
20 This module defines the following package methods
21  
22 =head2 table
23  
24 Name of the Physical table in the database
25  
26 =cut
27  
28 3 __PACKAGE__
29 ->table('employment_history');
30  
31  
32 =head2 add_columns
33  
34 Add columns and meta information
35  
36 =head3 fk_person_id, fk_company_id
37  
38 two fields making up a key to the CompanyPerson
39  
40 =head3 started
41  
42 The date we started working for the company
43  
44 =cut
45  
46 3 __PACKAGE__
47 ->add_columns(
48 employment_history_id => {
49 data_type=>'integer',
50 },
51 fk_person_id => {
52 data_type=>'integer',
53 },
54 fk_company_id => {
55 data_type=>'integer',
56 },
57 started => {
58 data_type=>'datetime',
59 default_value=>\'CURRENT_TIMESTAMP',
60 });
61  
62  
63 =head2 primary_key
64  
65 Sets the Primary keys for this table
66  
67 =cut
68  
69 3 __PACKAGE__
70 ->set_primary_key(qw/employment_history_id/);
71
72  
73 =head2 employment_history
74  
75 each instance of a company_person has a related employment history
76  
77 =cut
78  
79 3 __PACKAGE__
80 ->belongs_to (company_person => 'DBIx::Class::Schema::PopulateMore::Test::Schema::Result::CompanyPerson', {
81 'foreign.fk_company_id' => 'self.fk_company_id',
82 'foreign.fk_person_id' => 'self.fk_person_id',
83 });
84  
85 =head1 METHODS
86  
87 This module defines the following methods.
88  
89 =head1 AUTHOR
90  
91 Please see L<DBIx::Class::Schema::PopulateMore> For authorship information
92  
93 =head1 LICENSE
94  
95 Please see L<DBIx::Class::Schema::PopulateMore> For licensing terms.
96  
97 =cut
98  
99  
100 3 1;
« PopulateMore/Test/Schema/Result/CompanyPerson.pm ↑ Summary PopulateMore/Test/Schema/Result/FriendList.pm »