Ergänze das U1-Fachmodell für Inhalt, Paket und Angebot.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
2035c46edd
commit
2ded4b7fad
35 files changed
+2115
No files matched your search
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domain\Entitlement;
|
||||
|
||||
use App\Domain\Identity\Party;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
/**
|
||||
* Individuelle Berechtigungsquelle eines Inhabers. Die Entscheidung, wann ein Erwerb entsteht, folgt später.
|
||||
* Der Bezug ist je Typ eine Bestellposition, ein Angebot, ein Verwaltungsvorgang oder ein Abonnement.
|
||||
*/
|
||||
class Acquisition extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'party_id',
|
||||
'type',
|
||||
'reference_type',
|
||||
'reference_id',
|
||||
'conditions',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'type' => AcquisitionType::class,
|
||||
'conditions' => 'array',
|
||||
];
|
||||
}
|
||||
|
||||
public function party(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Party::class);
|
||||
}
|
||||
|
||||
public function grants(): HasMany
|
||||
{
|
||||
return $this->hasMany(Grant::class);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user