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
|
|
|
|
10
|
|
|
/** |
11
|
|
|
* Class JobApplication |
12
|
|
|
* |
13
|
|
|
* @property int $id |
14
|
|
|
* @property int $job_poster_id |
15
|
|
|
* @property int $application_status_id |
16
|
|
|
* @property int $applicant_id |
17
|
|
|
* @property \Jenssegers\Date\Date $created_at |
18
|
|
|
* @property \Jenssegers\Date\Date $updated_at |
19
|
|
|
* |
20
|
|
|
* @property \App\Models\Applicant $applicant |
21
|
|
|
* @property \App\Models\Lookup\ApplicationStatus $application_status |
22
|
|
|
* @property \App\Models\JobPoster $job_poster |
23
|
|
|
* @property \Illuminate\Database\Eloquent\Collection $application_work_samples |
24
|
|
|
* @property \Illuminate\Database\Eloquent\Collection $job_application_answers |
25
|
|
|
* @property \Illuminate\Database\Eloquent\Collection $skill_declarations |
26
|
|
|
*/ |
|
|
|
|
27
|
|
|
class JobApplication extends BaseModel { |
|
|
|
|
28
|
|
|
|
29
|
|
|
protected $casts = [ |
30
|
|
|
'job_poster_id' => 'int', |
31
|
|
|
'application_status_id' => 'int', |
32
|
|
|
'applicant_id' => 'int' |
33
|
|
|
]; |
34
|
|
|
protected $fillable = []; |
35
|
|
|
|
36
|
|
|
public function applicant() { |
|
|
|
|
37
|
|
|
return $this->belongsTo(\App\Models\Applicant::class); |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
public function application_status() { |
|
|
|
|
41
|
|
|
return $this->belongsTo(\App\Models\Lookup\ApplicationStatus::class); |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
public function job_poster() { |
|
|
|
|
45
|
|
|
return $this->belongsTo(\App\Models\JobPoster::class); |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
public function application_work_samples() { |
|
|
|
|
49
|
|
|
return $this->hasMany(\App\Models\ApplicationWorkSample::class); |
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
public function job_application_answers() { |
|
|
|
|
53
|
|
|
return $this->hasMany(\App\Models\JobApplicationAnswer::class); |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
public function skill_declarations() { |
|
|
|
|
57
|
|
|
return $this->hasMany(\App\Models\SkillDeclaration::class); |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
} |
61
|
|
|
|