Completed
Pull Request — dev (#297)
by Tristan
11:17
created

Manager::work_environment()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 2
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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 string $twitter_username
22
 * @property string $linkedin_username
23
 * @property int $user_id
24
 * @property \Jenssegers\Date\Date $created_at
25
 * @property \Jenssegers\Date\Date $updated_at
26
 *
27
 * @property \App\Models\User $user
28
 * @property \App\Models\Lookup\Department $department
29
 * @property \Illuminate\Database\Eloquent\Collection $job_posters
30
 * @property \App\Models\WorkEnvironment $work_environment
31
 * @property \App\Models\TeamCulture $team_culture
32
 * @property \App\Models\Lookup\Frequency $work_review_frequency
33
 * @property \App\Models\Lookup\Frequency $stay_late_frequency
34
 * @property \App\Models\Lookup\Frequency $engage_team_frequency
35
 * @property \App\Models\Lookup\Frequency $development_opportunity_frequency
36
 * @property \App\Models\Lookup\Frequency $refuse_low_value_work_frequency
37
 *
38
 * Localized Properties:
39
 * @property string $about_me
40
 * @property string $greatest_accomplishment
41
 * @property string $branch
42
 * @property string $division
43
 * @property string $position
44
 * @property string $work_experience
45
 * @property string $leadership_style
46
 * @property string $employee_learning
47
 * @property string $expectations
48
 */
49
class Manager extends BaseModel {
50
51
    use \Dimsav\Translatable\Translatable;
0 ignored issues
show
introduced by
The trait Dimsav\Translatable\Translatable requires some properties which are not provided by App\Models\Manager: $translations, $useTranslationFallback, $translationModel, $localeKey, $translationForeignKey
Loading history...
52
53
    public $translatedAttributes = ['about_me', 'greatest_accomplishmest', 'branch',
54
        'division', 'position', 'work_experience', 'education'];
55
    protected $casts = [
56
        'department_id' => 'int',
57
        'user_id' => 'int'
58
    ];
59
    protected $fillable = [
60
        'department_id',
61
        'twitter_username',
62
        'linkedin_username',
63
        'work_review_frequency_id',
64
        'stay_late_frequency_id',
65
        'engage_team_frequency_id',
66
        'development_opportunity_frequency_id',
67
        'refuse_low_value_work_frequency_id'
68
    ];
69
    protected $with = [
70
        'department',
71
        'work_review_frequency',
72
        'stay_late_frequency',
73
        'engage_team_frequency',
74
        'development_opportunity_frequency',
75
        'refuse_low_value_work_frequency'
76
    ];
77
78
    public function user() {
79
        return $this->belongsTo(\App\Models\User::class);
80
    }
81
82
    public function department() {
83
        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
    public function work_environment() {
91
        return $this->hasOne(\App\Models\WorkEnvironment::class);
92
    }
93
94
    public function team_culture() {
95
        return $this->hasOne(\App\Models\TeamCulture::class);
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