hasMany(PaymentTransaction::class); } public function scopeActive(Builder $query): Builder { return $query->where('is_active', true); } public function formattedAmount(): string { return number_format($this->amount / 100, 2, ',', ' ').' '.strtoupper($this->currency); } protected function casts(): array { return [ 'purpose' => BillingProductPurpose::class, 'amount' => 'integer', 'is_active' => 'boolean', 'sort_order' => 'integer', ]; } }