'integer', 'bonus' => 'integer', 'deduction' => 'integer', 'total_salary' => 'integer', 'is_paid' => 'boolean', ]; } protected function baseSalaryFormatted(): Attribute { return Attribute::make( get: fn () => $this->base_salary ? 'Rp '.number_format($this->base_salary, 0, ',', '.') : null, ); } protected function bonusFormatted(): Attribute { return Attribute::make( get: fn () => $this->bonus ? 'Rp '.number_format($this->bonus, 0, ',', '.') : null, ); } protected function deductionFormatted(): Attribute { return Attribute::make( get: fn () => $this->deduction ? 'Rp '.number_format($this->deduction, 0, ',', '.') : null, ); } protected function totalSalaryFormatted(): Attribute { return Attribute::make( get: fn () => $this->total_salary ? 'Rp '.number_format($this->total_salary, 0, ',', '.') : null, ); } protected function periodMonthFormatted(): Attribute { return Attribute::make( get: fn () => $this->period_month ? Carbon::parse($this->period_month)->translatedFormat('F Y') : null, ); } public function adjustments(): HasMany { return $this->hasMany(PayrollAdjustment::class); } public function user(): BelongsTo { return $this->belongsTo(User::class); } }