over naar uuids, policies, predefined mutations aan kunnen passen
This commit is contained in:
@@ -11,14 +11,27 @@ class PredefinedMutation extends Model
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'ledger_id',
|
||||
'dynamic_id',
|
||||
'name',
|
||||
'description',
|
||||
'amount',
|
||||
'type',
|
||||
];
|
||||
|
||||
public function ledger(): BelongsTo
|
||||
public function dynamic(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Ledger::class);
|
||||
return $this->belongsTo(Dynamic::class);
|
||||
}
|
||||
|
||||
protected static function booted(): void
|
||||
{
|
||||
static::creating(function ($model) {
|
||||
$model->uuid = (string) \Illuminate\Support\Str::uuid();
|
||||
});
|
||||
}
|
||||
|
||||
public function getRouteKeyName()
|
||||
{
|
||||
return 'uuid';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user