35 lines
676 B
PHP
35 lines
676 B
PHP
<?php
|
|
|
|
namespace App\Domain\Entitlement;
|
|
|
|
use App\Domain\Catalog\Offer;
|
|
use App\Domain\Identity\Party;
|
|
use App\Models\User;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class ManualGrant extends Model
|
|
{
|
|
protected $fillable = [
|
|
'actor_id',
|
|
'party_id',
|
|
'offer_id',
|
|
'reason',
|
|
];
|
|
|
|
public function actor(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class, 'actor_id');
|
|
}
|
|
|
|
public function party(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Party::class);
|
|
}
|
|
|
|
public function offer(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Offer::class);
|
|
}
|
|
}
|