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
|
|
|
|
75
|
18 |
|
public function user() { |
|
|
|
|
76
|
18 |
|
return $this->belongsTo(\App\Models\User::class); |
77
|
|
|
} |
78
|
|
|
|
79
|
3 |
|
public function department() { |
|
|
|
|
80
|
3 |
|
return $this->belongsTo(\App\Models\Lookup\Department::class); |
81
|
|
|
} |
82
|
|
|
|
83
|
|
|
public function job_posters() { |
|
|
|
|
84
|
|
|
return $this->hasMany(\App\Models\JobPoster::class); |
85
|
|
|
} |
86
|
|
|
|
87
|
23 |
|
public function work_environment() { |
|
|
|
|
88
|
23 |
|
return $this->hasOne(\App\Models\WorkEnvironment::class)->withDefault(); |
89
|
|
|
} |
90
|
|
|
|
91
|
23 |
|
public function team_culture() { |
|
|
|
|
92
|
23 |
|
return $this->hasOne(\App\Models\TeamCulture::class)->withDefault(); |
93
|
|
|
} |
94
|
|
|
/* |
95
|
|
|
* @property \App\Models\Lookup\Frequency $review_options |
96
|
|
|
* @property \App\Models\Lookup\Frequency $staylate |
97
|
|
|
* @property \App\Models\Lookup\Frequency $engage |
98
|
|
|
* @property \App\Models\Lookup\Frequency $opportunities |
99
|
|
|
* @property \App\Models\Lookup\Frequency $low_value_work_requests |
100
|
|
|
* |
101
|
|
|
* work_review_frequency |
102
|
|
|
* stay_late_frequency |
103
|
|
|
* engage_team_frequency |
104
|
|
|
* development_opportunity_frequency |
105
|
|
|
* refuse_low_value_work_frequency |
106
|
|
|
*/ |
107
|
|
|
public function work_review_frequency() { |
|
|
|
|
108
|
|
|
return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
109
|
|
|
} |
110
|
|
|
|
111
|
|
|
public function stay_late_frequency() { |
|
|
|
|
112
|
|
|
return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
113
|
|
|
} |
114
|
|
|
|
115
|
|
|
public function engage_team_frequency() { |
|
|
|
|
116
|
|
|
return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
117
|
|
|
} |
118
|
|
|
|
119
|
|
|
public function development_opportunity_frequency() { |
|
|
|
|
120
|
|
|
return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
121
|
|
|
} |
122
|
|
|
|
123
|
|
|
public function refuse_low_value_work_frequency() { |
|
|
|
|
124
|
|
|
return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
125
|
|
|
} |
126
|
|
|
} |
127
|
|
|
|