silent-auction/app/Models/Checkout.php

36 lines
630 B
PHP
Raw Normal View History

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';
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-08-08 14:57:49 -04:00
return $this->belongsTo(Bidders::class, 'idbidders');
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-08-08 14:57:49 -04:00
return $this->hasMany(PaymentMethods::class, 'payment_method', 'pm_id');
2018-12-23 10:26:26 -05:00
}
2018-12-23 09:00:22 -05:00
}