'decimal:4', 'stock_before' => 'decimal:4', 'stock_after' => 'decimal:4', ]; } public function createdAtFormatted(): Attribute { return Attribute::make( get: fn () => $this->created_at?->translatedFormat('l, d F Y H:i'), ); } public function typeLabel(): Attribute { return Attribute::make( get: fn () => match ($this->type) { 'in' => 'Masuk', 'out' => 'Keluar', 'transfer' => 'Transfer', 'adjustment' => 'Penyesuaian', default => $this->type, }, ); } public function stockable(): MorphTo { return $this->morphTo(); } public function source(): MorphTo { return $this->morphTo(); } public function user(): BelongsTo { return $this->belongsTo(User::class); } }