70 lines
2.0 KiB
PHP
70 lines
2.0 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Backpack\CRUD\app\Models\Traits\CrudTrait;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Resolutionbasis extends Model
|
|
{
|
|
use CrudTrait;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| GLOBAL VARIABLES
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
|
|
protected $table = 'resolutionbasis';
|
|
// protected $primaryKey = 'id';
|
|
// public $timestamps = false;
|
|
protected $guarded = ['id'];
|
|
protected $fillable = [
|
|
'contract_id', 'workflow_id', 'department_id', 'resolution_id', 'resolutionbasis'
|
|
];
|
|
protected $with = ['department','resolution'];
|
|
// protected $hidden = [];
|
|
// protected $dates = [];
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| FUNCTIONS
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| RELATIONS
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
public function department(){
|
|
return $this->belongsTo(Department::class, 'department_id');
|
|
}
|
|
|
|
public function resolution(){
|
|
return $this->belongsTo(Resolution::class, 'resolution_id');
|
|
}
|
|
|
|
public function contract(){
|
|
return $this->belongsTo(Contract::class, 'contract_id', 'foreign_ID');
|
|
}
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| SCOPES
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| ACCESSORS
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| MUTATORS
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
}
|