Initial Commit; base feats
This commit is contained in:
commit
9732135e90
137 changed files with 13856 additions and 0 deletions
37
app/Models/Ticket.php
Normal file
37
app/Models/Ticket.php
Normal 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');
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue