1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace App\Models; |
4
|
|
|
|
5
|
|
|
use App\Models\BaseModel; |
6
|
|
|
|
7
|
|
|
/** |
8
|
|
|
* Class ExperienceEducation |
9
|
|
|
* |
10
|
|
|
* @property int $id |
11
|
|
|
* @property int $education_type_id |
12
|
|
|
* @property string $area_of_study |
13
|
|
|
* @property string $institution |
14
|
|
|
* @property int $education_status_id |
15
|
|
|
* @property boolean $is_active |
16
|
|
|
* @property \Jenssegers\Date\Date $start_date |
17
|
|
|
* @property \Jenssegers\Date\Date $end_date |
18
|
|
|
* @property string $thesis_title |
19
|
|
|
* @property boolean $has_blockcert |
20
|
|
|
* @property int $experienceable_id |
21
|
|
|
* @property string $experienceable_type |
22
|
|
|
* @property \Jenssegers\Date\Date $created_at |
23
|
|
|
* @property \Jenssegers\Date\Date $updated_at |
24
|
|
|
* |
25
|
|
|
* @property \App\Models\Lookup\EducationType $education_type |
26
|
|
|
* @property \App\Models\Lookup\EducationStatus $education_status |
27
|
|
|
* @property \App\Models\Applicant|\App\Models\JobApplication $experienceable |
28
|
|
|
* @property \Illuminate\Database\Eloquent\Collection $skills |
29
|
|
|
*/ |
30
|
|
|
class ExperienceEducation extends BaseModel |
31
|
|
|
{ |
32
|
|
|
protected $casts = [ |
33
|
|
|
'education_type_id' => 'int', |
34
|
|
|
'area_of_study' => 'string', |
35
|
|
|
'institution' => 'string', |
36
|
|
|
'education_status_id' => 'int', |
37
|
|
|
'is_active' => 'boolean', |
38
|
|
|
'start_date' => 'date', |
39
|
|
|
'end_date' => 'date', |
40
|
|
|
'thesis_title' => 'string', |
41
|
|
|
'has_blockcert' => 'boolean' |
42
|
|
|
]; |
43
|
|
|
|
44
|
|
|
protected $fillable = [ |
45
|
|
|
'education_type_id', |
46
|
|
|
'area_of_study', |
47
|
|
|
'institution', |
48
|
|
|
'education_status_id', |
49
|
|
|
'is_active', |
50
|
|
|
'start_date', |
51
|
|
|
'end_date', |
52
|
|
|
'thesis_title', |
53
|
|
|
'has_blockcert' |
54
|
|
|
]; |
55
|
|
|
|
56
|
|
|
protected $table = ['experiences_education']; |
57
|
|
|
|
58
|
|
|
public function education_type() //phpcs:ignore |
59
|
|
|
{ |
60
|
|
|
return $this->belongsTo(\App\Models\Lookup\EducationType::class); |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
public function education_status() //phpcs:ignore |
64
|
|
|
{ |
65
|
|
|
return $this->belongsTo(\App\Models\Lookup\EducationStatus::class); |
66
|
|
|
} |
67
|
|
|
|
68
|
|
|
public function experienceable() //phpcs:ignore |
69
|
|
|
{ |
70
|
|
|
return $this->morphTo(); |
71
|
|
|
} |
72
|
|
|
|
73
|
|
|
public function skills() |
74
|
|
|
{ |
75
|
|
|
return $this->morphToMany(\App\Models\Skill::class, 'experience', 'experience_skills'); |
76
|
|
|
} |
77
|
|
|
} |
78
|
|
|
|