41 lines
719 B
PHP
41 lines
719 B
PHP
<?php
|
|
|
|
namespace App\Models\Contracts;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class SupplyChainContract extends Model
|
|
{
|
|
//Table Name
|
|
public $table = 'supply_chain_contracts';
|
|
|
|
//Primary Key
|
|
public $primaryKey = 'id';
|
|
|
|
//Timestamps
|
|
public $timestamps = true;
|
|
|
|
/**
|
|
* The attributes that are mass assignable
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $fillable = [
|
|
'issuer_id',
|
|
'issuer_name',
|
|
'title',
|
|
'end_date',
|
|
'delivery_by',
|
|
'body',
|
|
'state',
|
|
'final_cost',
|
|
];
|
|
|
|
//Relationship
|
|
public function Bids() {
|
|
return $this->hasMany('App\Models\Contracts\SupplyChainBid', 'contract_id', 'id');
|
|
}
|
|
|
|
|
|
}
|