2018-12-23 09:00:22 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
class Checkout extends Model
|
|
|
|
{
|
2018-12-23 10:26:26 -05:00
|
|
|
protected $table = 'checkout';
|
2022-09-04 13:57:38 -04:00
|
|
|
|
|
|
|
protected $primaryKey = 'checkout_id';
|
|
|
|
|
2018-12-23 10:26:26 -05:00
|
|
|
protected $fillable = [
|
2018-12-23 09:00:22 -05:00
|
|
|
'bidder_num',
|
|
|
|
'winnertotal',
|
|
|
|
'payment_method',
|
|
|
|
'check_number',
|
|
|
|
'cc_transaction',
|
2018-12-23 10:17:10 -05:00
|
|
|
'cc_amount',
|
|
|
|
'created_at',
|
|
|
|
'updated_at'
|
2018-12-23 10:26:26 -05:00
|
|
|
];
|
2018-12-23 10:17:10 -05:00
|
|
|
|
2018-12-23 10:26:26 -05:00
|
|
|
protected $dates = [
|
|
|
|
'created_at',
|
|
|
|
'updated_at'
|
|
|
|
];
|
2018-12-23 09:00:22 -05:00
|
|
|
|
2018-12-23 10:26:26 -05:00
|
|
|
public function bidders()
|
|
|
|
{
|
2022-09-04 13:57:38 -04:00
|
|
|
return $this->belongsTo(Bidders::class, 'bidder_num');
|
2018-12-23 10:26:26 -05:00
|
|
|
}
|
2018-12-23 09:00:22 -05:00
|
|
|
|
2018-12-23 10:26:26 -05:00
|
|
|
public function paymentMethod()
|
|
|
|
{
|
2022-09-04 13:57:38 -04:00
|
|
|
return $this->hasMany(PaymentMethods::class, 'pm_id', 'payment_method');
|
2018-12-23 10:26:26 -05:00
|
|
|
}
|
2018-12-23 09:00:22 -05:00
|
|
|
}
|