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
|
|
|
|
10
|
|
|
use App\CRUD\TalentCloudCrudTrait as CrudTrait; |
11
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* Class Manager |
14
|
|
|
* |
15
|
|
|
* @property int $id |
16
|
|
|
* @property int $department_id |
17
|
|
|
* @property int $work_review_frequency_id |
18
|
|
|
* @property int $stay_late_frequency_id |
19
|
|
|
* @property int $engage_team_frequency_id |
20
|
|
|
* @property int $development_opportunity_frequency_id |
21
|
|
|
* @property int $refuse_low_value_work_frequency_id |
22
|
|
|
* @property int $years_experience |
23
|
|
|
* @property string $twitter_username |
24
|
|
|
* @property string $linkedin_url |
25
|
|
|
* @property int $user_id |
26
|
|
|
* @property \Jenssegers\Date\Date $created_at |
27
|
|
|
* @property \Jenssegers\Date\Date $updated_at |
28
|
|
|
* |
29
|
|
|
* @property \App\Models\User $user |
30
|
|
|
* @property \App\Models\Lookup\Department $department |
31
|
|
|
* @property \Illuminate\Database\Eloquent\Collection $job_posters |
32
|
|
|
* @property \App\Models\WorkEnvironment $work_environment |
33
|
|
|
* @property \App\Models\TeamCulture $team_culture |
34
|
|
|
* @property \App\Models\Lookup\Frequency $work_review_frequency |
35
|
|
|
* @property \App\Models\Lookup\Frequency $stay_late_frequency |
36
|
|
|
* @property \App\Models\Lookup\Frequency $engage_team_frequency |
37
|
|
|
* @property \App\Models\Lookup\Frequency $development_opportunity_frequency |
38
|
|
|
* @property \App\Models\Lookup\Frequency $refuse_low_value_work_frequency |
39
|
|
|
* |
40
|
|
|
* Localized Properties: |
41
|
|
|
* @property string $about_me |
42
|
|
|
* @property string $greatest_accomplishment |
43
|
|
|
* @property string $branch |
44
|
|
|
* @property string $division |
45
|
|
|
* @property string $position |
46
|
|
|
* @property string $leadership_style |
47
|
|
|
* @property string $employee_learning |
48
|
|
|
* @property string $expectations |
49
|
|
|
* @property string $education |
50
|
|
|
* @property string $career_journey |
51
|
|
|
* @property string $learning_path |
52
|
|
|
* |
53
|
|
|
* Methods |
54
|
|
|
* @method string toApiArray() |
55
|
|
|
*/ |
56
|
|
|
class Manager extends BaseModel { |
57
|
|
|
|
58
|
|
|
use \Dimsav\Translatable\Translatable; |
|
|
|
|
59
|
|
|
// Trait for Backpack |
60
|
|
|
use CrudTrait; |
|
|
|
|
61
|
|
|
|
62
|
|
|
public $translatedAttributes = [ |
|
|
|
|
63
|
|
|
'about_me', |
64
|
|
|
'greatest_accomplishment', |
65
|
|
|
'branch', |
66
|
|
|
'division', |
67
|
|
|
'position', |
68
|
|
|
'leadership_style', |
69
|
|
|
'employee_learning', |
70
|
|
|
'expectations', |
71
|
|
|
'education', |
72
|
|
|
'career_journey', |
73
|
|
|
'learning_path' |
74
|
|
|
]; |
75
|
|
|
protected $casts = [ |
|
|
|
|
76
|
|
|
'department_id' => 'int', |
77
|
|
|
'user_id' => 'int' |
78
|
|
|
]; |
79
|
|
|
protected $fillable = [ |
|
|
|
|
80
|
|
|
'department_id', |
81
|
|
|
'twitter_username', |
82
|
|
|
'linkedin_url', |
83
|
|
|
'work_review_frequency_id', |
84
|
|
|
'stay_late_frequency_id', |
85
|
|
|
'engage_team_frequency_id', |
86
|
|
|
'development_opportunity_frequency_id', |
87
|
|
|
'refuse_low_value_work_frequency_id', |
88
|
|
|
'years_experience' |
89
|
|
|
]; |
90
|
|
|
|
91
|
28 |
|
public function user() { |
|
|
|
|
92
|
28 |
|
return $this->belongsTo(\App\Models\User::class); |
93
|
|
|
} |
94
|
|
|
|
95
|
4 |
|
public function department() { |
|
|
|
|
96
|
4 |
|
return $this->belongsTo(\App\Models\Lookup\Department::class); |
97
|
|
|
} |
98
|
|
|
|
99
|
|
|
public function job_posters() { |
|
|
|
|
100
|
|
|
return $this->hasMany(\App\Models\JobPoster::class); |
101
|
|
|
} |
102
|
|
|
|
103
|
39 |
|
public function work_environment() { |
|
|
|
|
104
|
39 |
|
return $this->hasOne(\App\Models\WorkEnvironment::class)->withDefault(); |
105
|
|
|
} |
106
|
|
|
|
107
|
39 |
|
public function team_culture() { |
|
|
|
|
108
|
39 |
|
return $this->hasOne(\App\Models\TeamCulture::class)->withDefault(); |
109
|
|
|
} |
110
|
|
|
/* |
111
|
|
|
* @property \App\Models\Lookup\Frequency $review_options |
112
|
|
|
* @property \App\Models\Lookup\Frequency $staylate |
113
|
|
|
* @property \App\Models\Lookup\Frequency $engage |
114
|
|
|
* @property \App\Models\Lookup\Frequency $opportunities |
115
|
|
|
* @property \App\Models\Lookup\Frequency $low_value_work_requests |
116
|
|
|
* |
117
|
|
|
* work_review_frequency |
118
|
|
|
* stay_late_frequency |
119
|
|
|
* engage_team_frequency |
120
|
|
|
* development_opportunity_frequency |
121
|
|
|
* refuse_low_value_work_frequency |
122
|
|
|
*/ |
123
|
|
|
public function work_review_frequency() { |
|
|
|
|
124
|
|
|
return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
125
|
|
|
} |
126
|
|
|
|
127
|
|
|
public function stay_late_frequency() { |
|
|
|
|
128
|
|
|
return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
129
|
|
|
} |
130
|
|
|
|
131
|
|
|
public function engage_team_frequency() { |
|
|
|
|
132
|
|
|
return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
133
|
|
|
} |
134
|
|
|
|
135
|
|
|
public function development_opportunity_frequency() { |
|
|
|
|
136
|
|
|
return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
137
|
|
|
} |
138
|
|
|
|
139
|
|
|
public function refuse_low_value_work_frequency() { |
|
|
|
|
140
|
|
|
return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
141
|
|
|
} |
142
|
|
|
|
143
|
|
|
/** |
144
|
|
|
* Return the array of values used to represent this object in an api response. |
145
|
|
|
* This array should contain no nested objects (besides translations). |
146
|
|
|
* |
147
|
|
|
* @return mixed[] |
148
|
|
|
*/ |
149
|
2 |
|
public function toApiArray() |
|
|
|
|
150
|
|
|
{ |
151
|
2 |
|
$withTranslations = array_merge($this->toArray(), $this->getTranslationsArray()); |
152
|
2 |
|
return $withTranslations; |
153
|
|
|
} |
154
|
|
|
} |
155
|
|
|
|