1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* Created by Reliese Model. |
5
|
|
|
* Date: Thu, 12 Jul 2018 22:39:27 +0000. |
6
|
|
|
*/ |
|
|
|
|
7
|
|
|
|
8
|
|
|
namespace App\Models; |
9
|
|
|
use App\Models\TeamCulture; |
10
|
|
|
|
11
|
|
|
/** |
12
|
|
|
* Class Manager |
13
|
|
|
* |
14
|
|
|
* @property int $id |
15
|
|
|
* @property int $department_id |
16
|
|
|
* @property int $work_review_frequency_id |
17
|
|
|
* @property int $stay_late_frequency_id |
18
|
|
|
* @property int $engage_team_frequency_id |
19
|
|
|
* @property int $development_opportunity_frequency_id |
20
|
|
|
* @property int $refuse_low_value_work_frequency_id |
21
|
|
|
* @property int $years_experience |
22
|
|
|
* @property string $twitter_username |
23
|
|
|
* @property string $linkedin_url |
24
|
|
|
* @property int $user_id |
25
|
|
|
* @property \Jenssegers\Date\Date $created_at |
26
|
|
|
* @property \Jenssegers\Date\Date $updated_at |
27
|
|
|
* |
28
|
|
|
* @property \App\Models\User $user |
29
|
|
|
* @property \App\Models\Lookup\Department $department |
30
|
|
|
* @property \Illuminate\Database\Eloquent\Collection $job_posters |
31
|
|
|
* @property \App\Models\WorkEnvironment $work_environment |
32
|
|
|
* @property \App\Models\TeamCulture $team_culture |
33
|
|
|
* @property \App\Models\Lookup\Frequency $work_review_frequency |
34
|
|
|
* @property \App\Models\Lookup\Frequency $stay_late_frequency |
35
|
|
|
* @property \App\Models\Lookup\Frequency $engage_team_frequency |
36
|
|
|
* @property \App\Models\Lookup\Frequency $development_opportunity_frequency |
37
|
|
|
* @property \App\Models\Lookup\Frequency $refuse_low_value_work_frequency |
38
|
|
|
* |
39
|
|
|
* Localized Properties: |
40
|
|
|
* @property string $about_me |
41
|
|
|
* @property string $greatest_accomplishment |
42
|
|
|
* @property string $branch |
43
|
|
|
* @property string $division |
44
|
|
|
* @property string $position |
45
|
|
|
* @property string $leadership_style |
46
|
|
|
* @property string $employee_learning |
47
|
|
|
* @property string $expectations |
48
|
|
|
* @property string $education |
49
|
|
|
* @property string $career_journey |
50
|
|
|
* @property string $learning_path |
51
|
|
|
*/ |
|
|
|
|
52
|
|
|
class Manager extends BaseModel { |
|
|
|
|
53
|
|
|
|
54
|
|
|
use \Dimsav\Translatable\Translatable; |
|
|
|
|
55
|
|
|
|
56
|
|
|
public $translatedAttributes = ['about_me', 'greatest_accomplishment', 'branch', |
57
|
|
|
'division', 'position', 'work_experience', 'education','leadership_style', |
58
|
|
|
'employee_learning','expectations','education','career_journey','learning_path']; |
59
|
|
|
protected $casts = [ |
60
|
|
|
'department_id' => 'int', |
61
|
|
|
'user_id' => 'int' |
62
|
|
|
]; |
63
|
|
|
protected $fillable = [ |
64
|
|
|
'department_id', |
65
|
|
|
'twitter_username', |
66
|
|
|
'linkedin_url', |
67
|
|
|
'work_review_frequency_id', |
68
|
|
|
'stay_late_frequency_id', |
69
|
|
|
'engage_team_frequency_id', |
70
|
|
|
'development_opportunity_frequency_id', |
71
|
|
|
'refuse_low_value_work_frequency_id', |
72
|
|
|
'years_experience' |
73
|
|
|
]; |
74
|
|
|
protected $with = [ |
75
|
|
|
'department', |
76
|
|
|
'work_review_frequency', |
77
|
|
|
'stay_late_frequency', |
78
|
|
|
'engage_team_frequency', |
79
|
|
|
'development_opportunity_frequency', |
80
|
|
|
'refuse_low_value_work_frequency' |
81
|
|
|
]; |
82
|
|
|
|
83
|
16 |
|
public function user() { |
|
|
|
|
84
|
16 |
|
return $this->belongsTo(\App\Models\User::class); |
85
|
|
|
} |
86
|
|
|
|
87
|
18 |
|
public function department() { |
|
|
|
|
88
|
18 |
|
return $this->belongsTo(\App\Models\Lookup\Department::class); |
89
|
|
|
} |
90
|
|
|
|
91
|
2 |
|
public function job_posters() { |
|
|
|
|
92
|
2 |
|
return $this->hasMany(\App\Models\JobPoster::class); |
93
|
|
|
} |
94
|
|
|
|
95
|
16 |
|
public function work_environment() { |
|
|
|
|
96
|
16 |
|
return $this->hasOne(\App\Models\WorkEnvironment::class)->withDefault(); |
97
|
|
|
} |
98
|
|
|
|
99
|
16 |
|
public function team_culture() { |
|
|
|
|
100
|
16 |
|
return $this->hasOne(\App\Models\TeamCulture::class)->withDefault(); |
101
|
|
|
} |
102
|
|
|
/* |
103
|
|
|
* @property \App\Models\Lookup\Frequency $review_options |
104
|
|
|
* @property \App\Models\Lookup\Frequency $staylate |
105
|
|
|
* @property \App\Models\Lookup\Frequency $engage |
106
|
|
|
* @property \App\Models\Lookup\Frequency $opportunities |
107
|
|
|
* @property \App\Models\Lookup\Frequency $low_value_work_requests |
108
|
|
|
* |
109
|
|
|
* work_review_frequency |
110
|
|
|
* stay_late_frequency |
111
|
|
|
* engage_team_frequency |
112
|
|
|
* development_opportunity_frequency |
113
|
|
|
* refuse_low_value_work_frequency |
114
|
|
|
*/ |
115
|
18 |
|
public function work_review_frequency() { |
|
|
|
|
116
|
18 |
|
return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
117
|
|
|
} |
118
|
|
|
|
119
|
18 |
|
public function stay_late_frequency() { |
|
|
|
|
120
|
18 |
|
return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
121
|
|
|
} |
122
|
|
|
|
123
|
18 |
|
public function engage_team_frequency() { |
|
|
|
|
124
|
18 |
|
return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
125
|
|
|
} |
126
|
|
|
|
127
|
18 |
|
public function development_opportunity_frequency() { |
|
|
|
|
128
|
18 |
|
return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
129
|
|
|
} |
130
|
|
|
|
131
|
18 |
|
public function refuse_low_value_work_frequency() { |
|
|
|
|
132
|
18 |
|
return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
133
|
|
|
} |
134
|
|
|
} |
135
|
|
|
|