Basic signup for events
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\RelationModels;
|
||||
|
||||
use App\Casts\AmountCast;
|
||||
use App\Enumerations\ParticipationFeeType;
|
||||
use App\Enumerations\ParticipationType;
|
||||
use App\Models\Tenant;
|
||||
use App\Scopes\CommonModel;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
@@ -12,14 +13,19 @@ class EventParticipationFee extends CommonModel
|
||||
{
|
||||
protected $table = 'event_participation_fees';
|
||||
|
||||
protected $fillable = ['tenant', 'type', 'name', 'description', 'amount'];
|
||||
protected $casts = ['amount' => AmountCast::class];
|
||||
protected $fillable = ['tenant', 'type', 'name', 'description', 'amount_standard', 'amount_reduced', 'amount_solidarity', 'active'];
|
||||
protected $casts = [
|
||||
'amount_standard' => AmountCast::class,
|
||||
'amount_reduced' => AmountCast::class,
|
||||
'amount_solidarity' => AmountCast::class,
|
||||
|
||||
];
|
||||
|
||||
public function tenant() : BelongsTo {
|
||||
return $this->belongsTo(Tenant::class, 'tenant', 'slug');
|
||||
}
|
||||
|
||||
public function type() : BelongsTo {
|
||||
return $this->belongsTo(ParticipationFeeType::class, 'type', 'slug');
|
||||
return $this->belongsTo(ParticipationType::class, 'type', 'slug');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user