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

39
app/Models/Price.php Normal file
View file

@ -0,0 +1,39 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Price extends Model
{
// Price can differ for Adults, Children, Seniors, etc.
// Price can default to a base price, but can be overridden by a specific showing.
// When creating a showing, there will be rows for each price type.
// If for example a childrens price is manually removed, the ticket will not be available for children. (Handy for special events)
protected $table = 'prices';
protected $primaryKey = 'price_id';
protected $fillable = [
'price_type', // ENUM: (Adult, Child, Senior, loveseat(2 people))
'price_value', // Decimal
'showing_id', // which showing is this price for?
'user_id', // who added the price?
];
protected $hidden = [
'created_at',
'updated_at',
];
public function showing()
{
return $this->belongsTo(Showing::class, 'showing_id', 'showing_id');
}
public function user()
{
return $this->belongsTo(User::class, 'user_id', 'user_id');
}
}