MIF_E31222882/app/Models/PendingBooking.php

37 lines
680 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class PendingBooking extends Model
{
use HasFactory;
protected $fillable = [
'user_id',
'table_id',
'start_time',
'end_time',
'total_amount',
'order_id',
'expired_at',
];
protected $casts = [
'start_time' => 'datetime',
'end_time' => 'datetime',
'expired_at' => 'datetime',
];
public function user()
{
return $this->belongsTo(User::class);
}
public function table()
{
return $this->belongsTo(Table::class);
}
}