first commit
This commit is contained in:
55
Modules/Recruit/app/Models/JobApplication.php
Normal file
55
Modules/Recruit/app/Models/JobApplication.php
Normal file
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Recruit\Models;
|
||||
|
||||
use App\Models\Document;
|
||||
use App\Traits\StatusTrait;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Modules\Recruit\Database\factories\JobApplicationFactory;
|
||||
|
||||
class JobApplication extends Model
|
||||
{
|
||||
use HasFactory, StatusTrait, Notifiable;
|
||||
|
||||
protected $table = 'tbl_job_applications';
|
||||
protected $primaryKey = 'job_application_id';
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'address',
|
||||
'phone',
|
||||
'email',
|
||||
'gender',
|
||||
'job_post_id',
|
||||
'working_experience',
|
||||
'prev_company',
|
||||
'working_mode',
|
||||
'working_type',
|
||||
'working_shift',
|
||||
'apply_date',
|
||||
'recommended_by',
|
||||
'status',
|
||||
'description',
|
||||
'remarks',
|
||||
'createdBy',
|
||||
'updatedBy',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'apply_date' => 'date',
|
||||
];
|
||||
public $appends = ['status_name'];
|
||||
public function jobPost()
|
||||
{
|
||||
return $this->belongsTo(JobPost::class, 'job_post_id');
|
||||
}
|
||||
|
||||
public function documents()
|
||||
{
|
||||
return $this->morphMany(Document::class, 'documentable');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user