Passed
Push — feature/job-status-transitions ( fcd539 )
by Tristan
05:41
created

JobPosterStatusHistory::user()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace App\Models;
4
5
/**
6
 * Class JobPosterStatus
7
 *
8
 * @property int $id
9
 * @property int $job_poster_id
10
 * @property int $user_id
11
 * @property int $from_job_poster_status_id
12
 * @property int $to_job_poster_status_id
13
 * @property \Jenssegers\Date\Date $created_at
14
 * @property \Jenssegers\Date\Date $updated_at
15
 *
16
 * @property \App\Models\JobPoster $job_poster
17
 * @property \App\Models\User $user
18
 * @property \App\Models\Lookup\JobPosterStatus $from
19
 * @property \App\Models\Lookup\JobPosterStatus $to
20
 *
21
 */
22
class JobPosterStatusHistory extends BaseModel
23
{
24
    protected $table = 'job_poster_status_history';
25
26
    protected $fillable = [];
27
28
    public function job_poster() // phpcs:ignore
29
    {
30
        return $this->belongsTo(\App\Models\JobPoster::class);
31
    }
32
33
    public function user() // phpcs:ignore
34
    {
35
        return $this->belongsTo(\App\Models\User::class);
36
    }
37
38
    public function from() // phpcs:ignore
39
    {
40
        return $this->belongsTo(\App\Models\Lookup\JobPosterStatus::class, 'from_job_poster_status_id');
41
    }
42
43
    public function to() // phpcs:ignore
44
    {
45
        return $this->belongsTo(\App\Models\Lookup\JobPosterStatus::class, 'to_job_poster_status_id');
46
    }
47
}
48