$this->account_type, 'account_id' => $this->account_id, // 游客的 account_id 是设备 id,不能拿去当用户 uid 'user' => $this->account_type === 'user' && $this->user ? $this->actor($this->user) : null, 'earned_balance' => (int) $this->earned_balance, 'earned_total' => (int) $this->earned_total, 'adjusted_total' => (int) $this->adjusted_total, 'spent_total' => (int) $this->spent_total, 'free_used_today' => (int) $this->free_used_today, 'daily_free' => (int) (config('mint.credits.policy.daily_free')[$this->account_type] ?? 0), 'last_activity_at' => $this->last_activity_at ? now('UTC')->parse($this->last_activity_at)->toIso8601ZuluString() : null, ]; } }