|
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
|
|
|
class Manager extends BaseModel { |
|
54
|
|
|
|
|
55
|
|
|
use \Dimsav\Translatable\Translatable; |
|
|
|
|
|
|
56
|
|
|
// Trait for Backpack |
|
57
|
|
|
use CrudTrait; |
|
|
|
|
|
|
58
|
|
|
|
|
59
|
|
|
public $translatedAttributes = ['about_me', 'greatest_accomplishment', 'branch', |
|
|
|
|
|
|
60
|
|
|
'division', 'position', 'work_experience', 'education','leadership_style', |
|
61
|
|
|
'employee_learning','expectations','education','career_journey','learning_path']; |
|
62
|
|
|
protected $casts = [ |
|
|
|
|
|
|
63
|
|
|
'department_id' => 'int', |
|
64
|
|
|
'user_id' => 'int' |
|
65
|
|
|
]; |
|
66
|
|
|
protected $fillable = [ |
|
|
|
|
|
|
67
|
|
|
'department_id', |
|
68
|
|
|
'twitter_username', |
|
69
|
|
|
'linkedin_url', |
|
70
|
|
|
'work_review_frequency_id', |
|
71
|
|
|
'stay_late_frequency_id', |
|
72
|
|
|
'engage_team_frequency_id', |
|
73
|
|
|
'development_opportunity_frequency_id', |
|
74
|
|
|
'refuse_low_value_work_frequency_id', |
|
75
|
|
|
'years_experience' |
|
76
|
|
|
]; |
|
77
|
|
|
|
|
78
|
22 |
|
public function user() { |
|
|
|
|
|
|
79
|
22 |
|
return $this->belongsTo(\App\Models\User::class); |
|
80
|
|
|
} |
|
81
|
|
|
|
|
82
|
2 |
|
public function department() { |
|
|
|
|
|
|
83
|
2 |
|
return $this->belongsTo(\App\Models\Lookup\Department::class); |
|
84
|
|
|
} |
|
85
|
|
|
|
|
86
|
|
|
public function job_posters() { |
|
|
|
|
|
|
87
|
|
|
return $this->hasMany(\App\Models\JobPoster::class); |
|
88
|
|
|
} |
|
89
|
|
|
|
|
90
|
30 |
|
public function work_environment() { |
|
|
|
|
|
|
91
|
30 |
|
return $this->hasOne(\App\Models\WorkEnvironment::class)->withDefault(); |
|
92
|
|
|
} |
|
93
|
|
|
|
|
94
|
30 |
|
public function team_culture() { |
|
|
|
|
|
|
95
|
30 |
|
return $this->hasOne(\App\Models\TeamCulture::class)->withDefault(); |
|
96
|
|
|
} |
|
97
|
|
|
/* |
|
98
|
|
|
* @property \App\Models\Lookup\Frequency $review_options |
|
99
|
|
|
* @property \App\Models\Lookup\Frequency $staylate |
|
100
|
|
|
* @property \App\Models\Lookup\Frequency $engage |
|
101
|
|
|
* @property \App\Models\Lookup\Frequency $opportunities |
|
102
|
|
|
* @property \App\Models\Lookup\Frequency $low_value_work_requests |
|
103
|
|
|
* |
|
104
|
|
|
* work_review_frequency |
|
105
|
|
|
* stay_late_frequency |
|
106
|
|
|
* engage_team_frequency |
|
107
|
|
|
* development_opportunity_frequency |
|
108
|
|
|
* refuse_low_value_work_frequency |
|
109
|
|
|
*/ |
|
110
|
|
|
public function work_review_frequency() { |
|
|
|
|
|
|
111
|
|
|
return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
|
112
|
|
|
} |
|
113
|
|
|
|
|
114
|
|
|
public function stay_late_frequency() { |
|
|
|
|
|
|
115
|
|
|
return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
|
116
|
|
|
} |
|
117
|
|
|
|
|
118
|
|
|
public function engage_team_frequency() { |
|
|
|
|
|
|
119
|
|
|
return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
|
120
|
|
|
} |
|
121
|
|
|
|
|
122
|
|
|
public function development_opportunity_frequency() { |
|
|
|
|
|
|
123
|
|
|
return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
|
124
|
|
|
} |
|
125
|
|
|
|
|
126
|
|
|
public function refuse_low_value_work_frequency() { |
|
|
|
|
|
|
127
|
|
|
return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
|
128
|
|
|
} |
|
129
|
|
|
} |
|
130
|
|
|
|