|
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\WorkSample; |
|
10
|
|
|
use Illuminate\Database\Eloquent\Collection; |
|
11
|
|
|
|
|
12
|
|
|
/** |
|
13
|
|
|
* Class Applicant |
|
14
|
|
|
* |
|
15
|
|
|
* @property int $id |
|
16
|
|
|
* @property string $personal_website |
|
17
|
|
|
* @property string $tagline |
|
18
|
|
|
* @property string $twitter_username |
|
19
|
|
|
* @property string $linkedin_url |
|
20
|
|
|
* @property int $user_ids |
|
21
|
|
|
* @property \Jenssegers\Date\Date $created_at |
|
22
|
|
|
* @property \Jenssegers\Date\Date $updated_at |
|
23
|
|
|
* |
|
24
|
|
|
* @property \App\Models\User $user |
|
25
|
|
|
* @property \Illuminate\Database\Eloquent\Collection $applicant_profile_answers |
|
26
|
|
|
* @property \Illuminate\Database\Eloquent\Collection $job_applications |
|
27
|
|
|
* @property \Illuminate\Database\Eloquent\Collection $degrees |
|
28
|
|
|
* @property \Illuminate\Database\Eloquent\Collection $courses |
|
29
|
|
|
* @property \Illuminate\Database\Eloquent\Collection $work_experiences |
|
30
|
|
|
* @property \Illuminate\Database\Eloquent\Collection $skill_declarations |
|
31
|
|
|
* @property \Illuminate\Database\Eloquent\Collection $references |
|
32
|
|
|
* @property \Illuminate\Database\Eloquent\Collection $work_samples |
|
33
|
|
|
* @property \Illuminate\Database\Eloquent\Collection $projects |
|
34
|
|
|
*/ |
|
|
|
|
|
|
35
|
|
|
class Applicant extends BaseModel { |
|
|
|
|
|
|
36
|
|
|
|
|
37
|
|
|
protected $casts = [ |
|
38
|
|
|
'user_id' => 'int' |
|
39
|
|
|
]; |
|
40
|
|
|
protected $fillable = [ |
|
41
|
|
|
'personal_website', |
|
42
|
|
|
'tagline', |
|
43
|
|
|
'twitter_username', |
|
44
|
|
|
'linkedin_url' |
|
45
|
|
|
]; |
|
46
|
|
|
|
|
47
|
|
|
public function user() { |
|
|
|
|
|
|
48
|
|
|
return $this->belongsTo(\App\Models\User::class); |
|
49
|
|
|
} |
|
50
|
|
|
|
|
51
|
|
|
public function applicant_profile_answers() { |
|
|
|
|
|
|
52
|
|
|
return $this->hasMany(\App\Models\ApplicantProfileAnswer::class); |
|
53
|
|
|
} |
|
54
|
|
|
|
|
55
|
|
|
public function job_applications() { |
|
|
|
|
|
|
56
|
|
|
return $this->hasMany(\App\Models\JobApplication::class); |
|
57
|
|
|
} |
|
58
|
|
|
|
|
59
|
|
|
public function degrees() { |
|
|
|
|
|
|
60
|
|
|
return $this->hasMany(\App\Models\Degree::class); |
|
61
|
|
|
} |
|
62
|
|
|
|
|
63
|
|
|
public function courses() { |
|
|
|
|
|
|
64
|
|
|
return $this->hasMany(\App\Models\Course::class); |
|
65
|
|
|
} |
|
66
|
|
|
|
|
67
|
|
|
public function work_experiences() { |
|
|
|
|
|
|
68
|
|
|
return $this->hasMany(\App\Models\WorkExperience::class); |
|
69
|
|
|
} |
|
70
|
|
|
|
|
71
|
|
|
public function skill_declarations() { |
|
|
|
|
|
|
72
|
|
|
return $this->hasMany(\App\Models\SkillDeclaration::class); |
|
73
|
|
|
} |
|
74
|
|
|
|
|
75
|
|
|
public function references() { |
|
|
|
|
|
|
76
|
|
|
return $this->hasMany(\App\Models\Reference::class); |
|
77
|
|
|
} |
|
78
|
|
|
|
|
79
|
|
|
public function work_samples() { |
|
|
|
|
|
|
80
|
|
|
return $this->hasMany(\App\Models\WorkSample::class); |
|
81
|
|
|
} |
|
82
|
|
|
|
|
83
|
|
|
public function projects() { |
|
|
|
|
|
|
84
|
|
|
return $this->hasMany(\App\Models\Project::class); |
|
85
|
|
|
} |
|
86
|
|
|
} |
|
87
|
|
|
|