1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* Created by Reliese Model. |
5
|
|
|
* Date: Thu, 12 Jul 2018 22:39:28 +0000. |
6
|
|
|
*/ |
|
|
|
|
7
|
|
|
|
8
|
|
|
namespace App\Models; |
9
|
|
|
use App\Models\Lookup\Frequency; |
10
|
|
|
use Prophecy\Prediction\CallTimesPrediction; |
11
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* Class WorkEnvironment |
14
|
|
|
* |
15
|
|
|
* @property int $id |
16
|
|
|
* @property int $manager_id |
17
|
|
|
* @property int $telework_allowed_frequency_id |
18
|
|
|
* @property int $flexible_hours_frequency_id |
19
|
|
|
* @property \Jenssegers\Date\Date $created_at |
20
|
|
|
* @property \Jenssegers\Date\Date $updated_at |
21
|
|
|
* |
22
|
|
|
* @property \App\Models\Manager $manager |
23
|
|
|
* @property \App\Models\Lookup\Frequency $telework_allowed_frequency |
24
|
|
|
* @property \App\Models\Lookup\Frequency $flexible_hours_frequency |
25
|
|
|
* @property \Illuminate\Database\Eloquent\Collection $workplace_photo_captions |
26
|
|
|
* @property \Illuminate\Database\Eloquent\Collection $work_environment_translations |
27
|
|
|
* |
28
|
|
|
* Localized Properties: |
29
|
|
|
* @property string $things_to_know |
30
|
|
|
*/ |
|
|
|
|
31
|
|
|
class WorkEnvironment extends BaseModel { |
|
|
|
|
32
|
|
|
|
33
|
|
|
use \Dimsav\Translatable\Translatable; |
|
|
|
|
34
|
|
|
|
35
|
|
|
public $translatedAttributes = ['things_to_know']; |
36
|
|
|
protected $casts = [ |
37
|
|
|
'telework_allowed_frequency_id' => 'int', |
38
|
|
|
'flexible_hours_frequency_id' => 'int', |
39
|
|
|
]; |
40
|
|
|
protected $fillable = [ |
41
|
|
|
'telework_allowed_frequency_id', |
42
|
|
|
'flexible_hours_frequency_id' |
43
|
|
|
]; |
44
|
|
|
protected $with = [ |
45
|
|
|
'telework_allowed_frequency', |
46
|
|
|
'flexible_hours_frequency' |
47
|
|
|
]; |
48
|
|
|
|
49
|
|
|
public function manager() { |
|
|
|
|
50
|
|
|
return $this->belongsTo(\App\Models\Manager::class); |
51
|
|
|
} |
52
|
|
|
|
53
|
6 |
|
public function telework_allowed_frequency() { |
|
|
|
|
54
|
6 |
|
return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
55
|
|
|
} |
56
|
|
|
|
57
|
6 |
|
public function flexible_hours_frequency() { |
|
|
|
|
58
|
6 |
|
return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
59
|
|
|
} |
60
|
|
|
|
61
|
6 |
|
public function workplace_photo_captions() { |
|
|
|
|
62
|
6 |
|
return $this->hasMany(\App\Models\WorkplacePhotoCaption::class); |
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
public function work_environment_translations() { |
|
|
|
|
66
|
|
|
return $this->hasMany(\App\Models\WorkEnvironmentTranslation::class); |
67
|
|
|
} |
68
|
|
|
|
69
|
|
|
} |
70
|
|
|
|