Creation and editing of events
This commit is contained in:
11
app/RelationModels/EventEatingHabits.php
Normal file
11
app/RelationModels/EventEatingHabits.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\RelationModels;
|
||||
|
||||
use App\Scopes\CommonModel;
|
||||
|
||||
class EventEatingHabits extends CommonModel
|
||||
{
|
||||
protected $table = 'event_allowed_eating_habits';
|
||||
protected $fillable = ['event_id', 'eating_habit_id'];
|
||||
}
|
||||
10
app/RelationModels/EventLocalGroups.php
Normal file
10
app/RelationModels/EventLocalGroups.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\RelationModels;
|
||||
|
||||
use App\Scopes\CommonModel;
|
||||
|
||||
class EventLocalGroups extends CommonModel {
|
||||
protected $table = 'event_local_groups';
|
||||
protected $fillable = ['event_id', 'local_group_id'];
|
||||
}
|
||||
11
app/RelationModels/EventManagers.php
Normal file
11
app/RelationModels/EventManagers.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\RelationModels;
|
||||
|
||||
use App\Scopes\CommonModel;
|
||||
|
||||
class EventManagers extends CommonModel
|
||||
{
|
||||
protected $table = 'event_managers';
|
||||
protected $fillable = ['event_id', 'user_id'];
|
||||
}
|
||||
25
app/RelationModels/EventParticipationFee.php
Normal file
25
app/RelationModels/EventParticipationFee.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\RelationModels;
|
||||
|
||||
use App\Casts\AmountCast;
|
||||
use App\Enumerations\ParticipationFeeType;
|
||||
use App\Models\Tenant;
|
||||
use App\Scopes\CommonModel;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class EventParticipationFee extends CommonModel
|
||||
{
|
||||
protected $table = 'event_participation_fees';
|
||||
|
||||
protected $fillable = ['tenant', 'type', 'name', 'description', 'amount'];
|
||||
protected $casts = ['amount' => AmountCast::class];
|
||||
|
||||
public function tenant() : BelongsTo {
|
||||
return $this->belongsTo(Tenant::class, 'tenant', 'slug');
|
||||
}
|
||||
|
||||
public function type() : BelongsTo {
|
||||
return $this->belongsTo(ParticipationFeeType::class, 'type', 'slug');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user