34 lines
648 B
PHP
34 lines
648 B
PHP
<?php
|
|
|
|
namespace Modules\PMS\Models;
|
|
|
|
use App\Traits\CreatedUpdatedBy;
|
|
use App\Traits\StatusTrait;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Modules\Employee\Models\Employee;
|
|
|
|
class Project extends Model
|
|
{
|
|
use StatusTrait, CreatedUpdatedBy;
|
|
|
|
protected $table = 'tbl_projects';
|
|
protected $guarded = [];
|
|
protected $appends = ['status_name'];
|
|
|
|
const CATEGORY = [
|
|
10 => 'Vue',
|
|
11 => 'Laravel',
|
|
];
|
|
|
|
public function client()
|
|
{
|
|
return $this->belongsTo(Client::class, 'client_id');
|
|
}
|
|
|
|
public function members()
|
|
{
|
|
return $this->belongsTo(Employee::class, 'members_id');
|
|
}
|
|
|
|
}
|