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