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

37
app/Models/Ticket.php Normal file
View file

@ -0,0 +1,37 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Ticket extends Model
{
protected $table = 'tickets';
protected $primaryKey = 'ticket_id';
protected $fillable = [
'order_id', // which order is this ticket for?
'showing_id', // which showing is this ticket for?
'seat_id', // which seat is the ticket for?
'price_id', // which price is this ticket?
'user_id', // who added the ticket?
];
protected $hidden = [
'created_at',
'updated_at',
];
public function order()
{
return $this->belongsTo(Order::class, 'order_id', 'order_id');
}
public function showing()
{
return $this->belongsTo(Showing::class, 'showing_id', 'showing_id');
}
}