'datetime', 'amount_cents' => 'integer', 'live' => 'boolean', 'derived' => 'boolean', 'payer' => 'array', 'order_snapshot' => 'array', ]; } protected static function booted(): void { static::updating(function (): never { throw new LogicException('Das Zahlungsjournal ist unveränderlich. Korrekturen sind neue Gegenbuchungen.'); }); static::deleting(function (): never { throw new LogicException('Das Zahlungsjournal ist unveränderlich. Einträge werden nie gelöscht.'); }); } public function order(): BelongsTo { return $this->belongsTo(Order::class); } public function isRefund(): bool { return $this->kind === self::KIND_REFUND; } }