26 lines
480 B
PHP
26 lines
480 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Models;
|
||
|
|
||
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
||
|
class WinningBids extends Model
|
||
|
{
|
||
|
protected $table = 'winning_bids';
|
||
|
protected $fillable = [
|
||
|
'winning_bidder_num',
|
||
|
'winning_cost',
|
||
|
'winning_item_num'
|
||
|
];
|
||
|
|
||
|
public function items()
|
||
|
{
|
||
|
return $this->hasMany('App\Models\Items', 'winning_item_num', 'iditems');
|
||
|
}
|
||
|
|
||
|
public function bidders()
|
||
|
{
|
||
|
return $this->belongsTo('App\Models\Bidders', 'winning_bidder_num', 'idbidders');
|
||
|
}
|
||
|
}
|