silent-auction/app/Models/Items.php

32 lines
527 B
PHP
Raw Permalink Normal View History

2018-12-23 09:00:22 -05:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Items extends Model
{
2018-12-23 10:26:26 -05:00
protected $table = 'items';
2022-09-04 13:57:38 -04:00
protected $primaryKey = 'iditems';
2018-12-23 10:26:26 -05:00
protected $fillable = [
2018-12-23 09:00:22 -05:00
'item_desc',
'item_min_bid',
'item_est_value',
2018-12-23 10:17:10 -05:00
'item_assigned_num',
'created_at',
'updated_at'
2018-12-23 10:26:26 -05:00
];
2018-12-23 09:00:22 -05:00
2018-12-23 10:26:26 -05:00
protected $dates = [
'created_at',
'updated_at'
];
2018-12-29 13:54:13 -05:00
2018-12-23 10:26:26 -05:00
public function winningBids()
{
2022-08-08 15:01:38 -04:00
return $this->belongsTo(WinningBids::class, 'iditems', 'winning_item_num');
2018-12-23 10:26:26 -05:00
}
2018-12-23 09:00:22 -05:00
}