Initial Commit; base feats

This commit is contained in:
Didier Slof 2022-11-23 09:32:34 +01:00
commit 9732135e90
Signed by: didier
GPG key ID: 01E71F18AA4398E5
137 changed files with 13856 additions and 0 deletions

36
app/Models/Seat.php Normal file
View file

@ -0,0 +1,36 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Seat extends Model
{
protected $table = 'seats';
protected $primaryKey = 'seat_id';
public $timestamps = false;
protected $fillable = [
'seat_row',
'seat_number',
'seat_type', // enum('standard', 'wheelchair', 'loveseat')
'room_id',
];
protected $hidden = [
'created_at',
'updated_at',
];
public function room()
{
return $this->belongsTo(Room::class, 'room_id', 'room_id');
}
public function orders()
{
return $this->belongsToMany(Order::class, 'order_seats', 'seat_id', 'order_id');
}
}