'array', ]; public function scopeForTenant($query, int $tenantId) { return $query->where('tenant_id', $tenantId); } public static function getOrCreate(int $tenantId, string $yearMonth): self { return static::firstOrCreate( ['tenant_id' => $tenantId, 'year_month' => $yearMonth], ['amount' => 0, 'memo' => null] ); } }