mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-08-01 08:16:55 -04:00
47 lines
947 B
PHP
47 lines
947 B
PHP
<?php
|
|
|
|
namespace Modules\JobPortal\Entities;
|
|
|
|
use Modules\JobPortal\Entities\BaseModel;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use App\Models\User;
|
|
|
|
class JobCandidate extends BaseModel
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'jp_job_candidates';
|
|
protected $fillable = [
|
|
'job_id',
|
|
'candidate_id',
|
|
'company_id',
|
|
'cv_id',
|
|
'message',
|
|
'status'
|
|
];
|
|
|
|
public function jobInfo()
|
|
{
|
|
return $this->belongsTo(Job::class, 'job_id');
|
|
}
|
|
|
|
public function candidateInfo()
|
|
{
|
|
return $this->belongsTo(Candidate::class, 'candidate_id');
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class, "candidate_id");
|
|
}
|
|
|
|
public function cvInfo()
|
|
{
|
|
return $this->belongsTo(CandidateCvs::class, 'cv_id');
|
|
}
|
|
|
|
public function company(){
|
|
return $this->belongsTo(Company::class,'company_id');
|
|
}
|
|
}
|