39 lines
755 B
PHP
39 lines
755 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Bidders extends Model
|
|
{
|
|
protected $table = 'bidders';
|
|
protected $fillable = [
|
|
'bidder_fname',
|
|
'bidder_lname',
|
|
'bidder_addr',
|
|
'bidder_city',
|
|
'bidder_state',
|
|
'bidder_zip',
|
|
'bidder_phone',
|
|
'bidder_email',
|
|
'bidder_assigned_number',
|
|
'created_at',
|
|
'updated_at'
|
|
];
|
|
|
|
protected $dates = [
|
|
'created_at',
|
|
'updated_at'
|
|
];
|
|
|
|
public function checkout()
|
|
{
|
|
return $this->hasMany('App\Models\Checkout', 'bidder_num', 'idbidders');
|
|
}
|
|
|
|
public function winningBids()
|
|
{
|
|
return $this->hasMany('App\Models\WinningBids', 'winning_bidder_num', 'idbidders');
|
|
}
|
|
}
|