71 lines
1.9 KiB
PHP
71 lines
1.9 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Backpack\CRUD\app\Models\Traits\CrudTrait;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
class Contract extends Model
|
|
{
|
|
use CrudTrait;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| GLOBAL VARIABLES
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
|
|
protected $table = 'contracts';
|
|
// protected $primaryKey = 'id';
|
|
// public $timestamps = false;
|
|
protected $guarded = ['id'];
|
|
protected $fillable = [
|
|
'foreign_ID',
|
|
'InputNumber',
|
|
'InputDate',
|
|
'RegDate',
|
|
'MarkerSpec',
|
|
'Workflow_ID',
|
|
'Note',
|
|
'Remark',
|
|
];
|
|
// protected $hidden = [];
|
|
// protected $dates = [];
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| FUNCTIONS
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| RELATIONS
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
|
|
public function resolution_basis():HasMany
|
|
{
|
|
return $this->hasMany(Resolutionbasis::class, 'contract_id', 'foreign_ID');
|
|
}
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| SCOPES
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| ACCESSORS
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| MUTATORS
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
}
|